Pax Exam Reactor

Reactor Strategies

A reactor strategy defines a factory for creating reactors. The reactor strategy determines whether the test container will be stopped and restarted between tests. The reactor strategy is defined by an annotation on the test class.

@RunWith(PaxExam.class)
@ExamReactorStrategy(PerMethod.class)
public class ExplodedReferenceTest {

}

Per Method

With the Per Method strategy, the test container is started and stopped before and after each individual test method. PerMethod is the default strategy.

Per Class

With the Per Class strategy, the test container is started and stopped before and after running all tests of a given test class. Thus, subsequent test methods are not completely isolated from any side effects of previous methods of the same test class.