Skip to content

Instantly share code, notes, and snippets.

@ursshivy
Created February 14, 2019 11:42
To retry a failed test, add retryAnalyzer attribute with implemented class of 'RetryAnalyzerImpl.java' in @test annotation
import org.testng.Assert;
import org.testng.annotations.Test;
public class RetryTest {
@Test(retryAnalyzer = RetryAnalyzerImpl.class)
public void firstTest() {
System.out.println("1");
Assert.assertFalse(true);
}
@Test(retryAnalyzer = RetryAnalyzerImpl.class)
public void secondTest() {
System.out.println("2");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment