Package com.vaadin.testbench
Class RetryRule
- java.lang.Object
-
- com.vaadin.testbench.RetryRule
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class RetryRule extends Object implements org.junit.rules.TestRule
A retry rule is used to re-run a test several times in case of a random failure. The test passes as soon as one attempt is executed without any errors, i.e. it is only run as many times as needed. The maximum number of attempts is specified in the constructor.- Since:
- 5.0
-
-
Constructor Summary
Constructors Constructor Description RetryRule(int maxAttempts)Constructs the retry rule with a maximum number of attempts.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statementapply(org.junit.runners.model.Statement base, org.junit.runner.Description description)intgetMaxAttempts()Gets the maximum number of times to run the test.
-
-
-
Method Detail
-
getMaxAttempts
public int getMaxAttempts()
Gets the maximum number of times to run the test.- Returns:
- the maximum number of times to run the test.
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)- Specified by:
applyin interfaceorg.junit.rules.TestRule
-
-