Reactor Strategies

A reactor strategy defines a factory for creating reactors. The reactor strategy determines whether or not the test container will be stopped and restarted between tests.

The reactor strategy is defined by an annotation on the test class.

@RunWith(JUnit4TestRunner.class)
@ExamReactorStrategy(AllConfinedStagedReactorFactory.class)
public class ExplodedReferenceTest
{
}

AllConfinedStagedReactorFactory

With the all confined strategy, a new test container is started and stopped for each test. Note that each test method from your test class may give rise to one or more tests, depending on the number of configurations and frameworks specified in your test class.

(For the Native Test Container, the number of frameworks is specified implicitly by the number of FrameworkFactory services found by the JDK ServiceLoader.)

This strategy is the default when no @ExamReactorStrategy annotation is found on the test class.

EagerSingleStagedReactorFactory

With the eager single strategy, the reactor starts all configured test containers before starting the first test, executes the tests in these containers and finally stops all containers after the last test has terminated.