Forum Discussion
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?
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!!
- sanj7 years agoSuper Contributor
This still does not solve the problem for the last test run.
test will still be flagged as a failure.
Thats what Lucian had mentioned and I tend to agree.
- srikanth927 years agoNew Contributor
Is there any other way to achieve??
- Lucian7 years agoCommunity HeroI will look into it tonight and come with a response.
Related Content
- 6 years ago
Recent Discussions
- 21 days ago