Forum Discussion
2 Replies
Sort By
- StevenColonSmartBear Alumni (Retired)
Thank you for posting to our Community Forum.
You can add the below script to the TestSuite TearDown Script section to rerun any TestCases that have failed.
//in Test Suite TearDown Script for ( testCaseResult in runner.results ) { testCaseName = testCaseResult.getTestCase().name log.info testCaseName if ( testCaseResult.getStatus().toString() == 'FAILED' ){ log.info "$testCaseName has failed" testCaseResult.testCase.run(null, false) } }
Have a great day!
- kowcikOccasional Contributor
Thanks for your update. It really worked. But the issue now is, all my failed cases are executed but the status of test is still fail even all the test cases are passed.
When i look into junit reports, the test case that got passed in reexecution still shown as fail..
Can u help us in this ?