@Retention(value=RUNTIME) @Target(value=METHOD) public @interface RetryOnFailure
RetryRule
.
Add the RetryRule
to your test and annotate tests with RetryOnFailure
.
public class YourTest { @Rule public RetryRule retryRule = new RetryRule(); @Test @RetryOnFailure(times=1) public void yourTest() { // This will be retried 1 time (total runs 2) before failing the test. throw new Exception("Failing test"); } }
Modifier and Type | Required Element and Description |
---|---|
int |
times |
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.