Reputation: 33
i have made a main() class,which is calling testng.xml.In the testNG.xml,i have coded for all the testNG classes(test cases ,done by selenium).Now I have created a JAR of the main() class.Then I have created a .bat file to execute the JAR.
Problem: I am trying to integrate my code with JENKINS,but each build is getting failed due to org.testng.TestNG Exception and NoclassFoundException
But whenever I am executing the JAR through .bat file(not in JENKINS) created.Its executing fine.
Upvotes: 0
Views: 1130
Reputation: 22069
Step1
Add "Execute Windows batch command" from the job config.
Step2
cd your_bat_script_directory
foo.bat
Upvotes: 0