@API(status=STABLE, since="1.0") public class LauncherFactory extends java.lang.Object
Launcher instances by invoking create().
Test engines are discovered at runtime using the
ServiceLoader facility. For that purpose, a
text file named META-INF/services/org.junit.platform.engine.TestEngine
has to be added to the engine's JAR file in which the fully qualified name
of the implementation class of the TestEngine
interface is declared.
TestExecutionListeners discovered at
runtime via the ServiceLoader facility are
automatically registered with the Launcher created by the factory.
Users may register additional listeners using the
Launcher.registerTestExecutionListeners(TestExecutionListener...)
method on the created launcher instance.
Launcher| Modifier and Type | Method | Description |
|---|---|---|
static Launcher |
create() |
Factory method for creating a new
Launcher using dynamically
detected test engines. |
public static Launcher create() throws PreconditionViolationException
Launcher using dynamically
detected test engines.
All dynamically detected TestExecutionListeners
are automatically registered in the created Launcher instance.
PreconditionViolationException - if no test engines are detected