RetryTest
Annotates either a test class or a test method with a retry request of times.
If this annotation is used in the same class and test methods, the annotation of the method takes precedence
Example:
@RetryTest(times = 5)
class SampleTest() {
@get:Rule
val retryRule = RetryTestRule()
@RetryTest(times = 2)
@Test
fun testSomething() {
// This test will be retried 2x if it fails
}
@Test
fun testAnotherThing() {
// This test will be retried 5x if it fails,
// because of the class configuration
}
}
Content copied to clipboard