Retry failed test cases from testng-failed.xml

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Retry failed test cases from testng-failed.xml

This post has NOT been accepted by the mailing list yet.

In addition to retrying each test case right after a failure, I would like to retry all failed test cases in testng-failed.xml. I have tried including the testng-failed.xml file in MySuite-testng.xml with <suite-files> tag. However, the testng-failed.xml is executed first. I have also tried including both suite xml files in a third dummy "wrapper" suite xml file. The result is the same: TestNG always run the testng-failed.xml first.

What I want eventually is retry all failed test cases, and merge the results: if a previously failed test case passed in retry, I want to mark the first test run of that test case as skipped, and mark the test case as passed in the emailable report.
How should approach this?

Thank you.