Package org.eclipse.jgit.junit
Class RepeatRule
java.lang.Object
org.eclipse.jgit.junit.RepeatRule
- All Implemented Interfaces:
org.junit.rules.TestRule
TestRule
which enables to run the same JUnit test
repeatedly. Add this rule to the test class
public class MyTest { @Rule public RepeatRule repeatRule = new RepeatRule(); ... }and annotate the test to be repeated with the
@Repeat(n=<repetitions>)
annotation
@Test @Repeat(n = 100) public void test() { ... }then this test will be repeated 100 times. If any test execution fails test repetition will be stopped.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Exception thrown if repeated execution of a test annotated with@Repeat
failed.private static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.junit.runners.model.Statement
apply
(org.junit.runners.model.Statement statement, org.junit.runner.Description description)
-
Field Details
-
LOG
-
-
Constructor Details
-
RepeatRule
public RepeatRule()
-
-
Method Details
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement statement, org.junit.runner.Description description) - Specified by:
apply
in interfaceorg.junit.rules.TestRule
-