When a test fails and then passes after retry using IRetryAnalyzer implementation, all dependent tests are skipped.
I tried removing failed and skipped tests results as noted below but it still doesn't seem to work.
@Override
public boolean retry(ITestResult result) {
int retryLimit = 4;
if(counter < retryLimit)
{
result.getTestContext().getFailedTests().removeResult(result);
result.getTestContext().getSkippedTests().removeResult(result);
counter++;
return true;
}
return false;
}
Any help or insight would be much appreciated. Thanks!
TestNG Version
latest (6.14.3)
Expected behavior
a() failed //i==0
a() passed //i==1
b() passed //i==2
Actual behavior
a() failed //i==0
a() passed //i==1
b() skipped // ***this is the problem***