Created
February 14, 2019 11:36
RetryAnalyzerImpl.java can be used to retry any failed test. You can update maximum retry count as per requirement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.testng.IRetryAnalyzer; | |
import org.testng.ITestResult; | |
public class RetryAnalyzerImpl implements IRetryAnalyzer { | |
private int retryCount = 0; | |
private static final int maxRetryCount = 1; | |
@Override | |
public boolean retry(ITestResult result) { | |
if (retryCount < maxRetryCount) { | |
retryCount++; | |
return true; | |
} | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment