I am using Selenium webdriver, in Java with TestNG, to run X number of test cases.
I would like for any test case to automatically restart (either from the start or from the point of failure) as soon as it fails.
I know that TestNG structure has the following method
@Override
public void onTestFailure(ITestResult tr) {
log("F");
}
but I don’t know how to find out which test file it was in, and then how to restart it.
source
share