0
votes

I am a newbie to Selenium and TestNG.

I have a Selenium testng project which uses gradle. I want to run the jar file in cmd. I have created an executable jar file and using "java -jar test.jar".

The problem which I am facing is, if there is a failed test case, the running of the jar file is stopped, I want it to cover through all the test cases even if there is a failed test case.

If I want to run the testng.xml the command is "java -cp F:\Selenium\SampleTestNG\lib*;F:\Selenium\SampleTestNG\bin org.testng.TestNG testng.xml", since I am using gradle, I dont have a separate folder for the testng-6.9.4.jar or selenium jar files.

Thank you

1
AFAIK, TestNG does not abort running the remaining tests, when a particular test fails. It aborts running remaining tests only when a configuration method fails. Can you show us a sample of what you are trying to do ? - Krishnan Mahadevan

1 Answers

0
votes

Try to use "Try and catch" to get those tests that are missing, map all the errors and use "Try and catch" as an optional approach to these errors