МС
Size: a a a
МС
S
AE
S
AE
AE
AE
AE
S
VS
OK
МС
OK
OK
OK
@Override
public boolean retry(ITestResult result) {int retryLimit = Integer.parseInt(StaticSuiteContext.getSystemProperty(SystemProps.MAX_TEST_RETRY));
if (!result.isSuccess()) { //Check if test not succeed
if (counter < retryLimit) { //Check if maxtry count is reached
counter++; //Increase the maxTry count by 1
System.out.println("Retrying test : " + result.getName());
System.out.println("Test status : " + getResultStatusName(result.getStatus()));
System.out.println("Retry count : " + counter);
return true; //Tells TestNG to re-run the test
} else {result.setStatus(ITestResult.FAILURE); //If maxCount reached,test marked as failed
}else {result.setStatus(ITestResult.SUCCESS); //If test passes, TestNG marks it as passed
}return false;
}OK

OK
OK