I am new to Jenkins and I have configured it on my Windows PC. I have to run failed test cases twice before considering that they are failing. I am using TestNG and Selenium Webdriver for writing test cases.
I have created a job in Jenkins which maps to my workspace and runs the testng.xml
. I have specified the path of testng.xml
in pom.xml
. I have created a maven project and I run the pom.xml
for running my test cases.
Now after a successful run of all test cases, I get surefire reports of the tests. I want to run the failed test cases i.e testng-failed.xml
twice. I have tried running it using the following command in the post build section:
cd path to workspace
mvn test -DtestNG.file=/target/surefire-reports/testng-failed.xml
But when I run the above command it runs testng.xml
instead of running testng-failed.xml
. I am not sure if I am on the correct path for running failed test cases.
I need help guys. I am stuck at this point.