I have created a maven project for testing my application. I have used Webdriver, TestNG framework in my projet. I have used maven surefire plugin and reporty-ng plugin to generate report for the test cases. This works fine when I run within IDE ( eclipse ) or command prompt using command ( mvn test site). Now I have to make it a jar file, so that I can put that jar file in any system and run it.
So here the problem comes:
- Maven jar does not include test source and class available in src\test . we may solve this using test-jar goal of maven jar plugin
- Even anyhow I may create maven jar file, but how do I run it , because I do not have main class, I use testng.xml suite to run my test. I use testng.xml in configuration of surefire plugin
So how I will run the jar file ?