Forum Discussion
- LucianCommunity Hero
I think that if the test case fails once it will be considered as failed for the other runs also no matter what is the last result.
A solution would be to reset the status after the first run but I am not very sure if this is possible. Can you share the code that takes care of the re-execution?
- srikanth92New Contributor
Hi Lucian,
Following is the code to re-execute the failure test cases,
for ( testCaseResult in runner.results )
{
testCaseName = testCaseResult.getTestCase().name
if ( testCaseResult.getStatus().toString() == "FAILED" )
{testCaseResult.testCase.run(null, false)
}
}Thank You!!
Related Content
- 6 years ago
Recent Discussions
- 8 days ago