mercredi 29 août 2018

Java. Execute tests form one jar

I need to build one executable *.jar file, that will contains src and test classes (and their resources). I have:

  • custom testing framework (aka src classes);
  • public libs for http transport, etc (aka dependency for src classes);
  • bunch of tests (aka test classes);
  • TestNG (as dependency for test classes).

I also have my test runner, that run tests as:

testNG.run();

That read *.xml from resources (in test resources).

I tryed maven jar manual, but i need just ONE jar.

All answers on stack didn't work. One time i cant add manifest file, one time i can't add resources files, one time this is two differet jars and i need use one as dependency.

Anyone know working solution or this?

P.S. this in not a production code. I know, that have test in production jar is bad idea. this is test for QA team.

Aucun commentaire:

Enregistrer un commentaire