Launcher instances by invoking create()
or create(LauncherConfig).
By default, test engines are discovered at runtime using the
ServiceLoader mechanism. 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 org.
interface is declared.
By default, test execution listeners are discovered at runtime via the
ServiceLoader mechanism and are
automatically registered with the Launcher created by this factory.
Users may register additional listeners using the
Launcher#registerTestExecutionListeners(TestExecutionListener.
method on the created launcher instance.
For full control over automatic registration and programmatic registration
of test engines and listeners, supply an instance of LauncherConfig
to create(LauncherConfig).
Launcher, LauncherConfig
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static List | |
| private static List | |
| private static Set | |
| public static Launcher | |
| public static Launcher | create(LauncherConfig
the configuration for the launcher; never config)nullFactory method for creating a new |
| private static DefaultLauncher | createDefaultLauncher(LauncherConfig config, LauncherConfigurationParameters configurationParameters, NamespacedHierarchicalStore<Namespace> sessionLevelStore)
|
| private static LauncherSessionListener | |
| private static Iterable | |
| public static LauncherSession | |
| public static LauncherSession | openSession(LauncherConfig
the configuration for the session and the launcher; never
config)nullFactory method for opening a new |
| private static void | |
| private static void | registerTestExecutionListeners(LauncherConfig config, Launcher launcher, LauncherConfigurationParameters configurationParameters)
|
| LauncherFactory | back to summary |
|---|---|
| private LauncherFactory() | |
| collectLauncherInterceptors | back to summary |
|---|---|
| private static List | |
| collectPostDiscoveryFilters | back to summary |
|---|---|
| private static List | |
| collectTestEngines | back to summary |
|---|---|
| private static Set | |
| create | back to summary |
|---|---|
| public static Launcher create() throws PreconditionViolationException Factory method for creating a new
| |
| create | back to summary |
|---|---|
| public static Launcher create(LauncherConfig config) throws PreconditionViolationException Factory method for creating a new
| |
| createDefaultLauncher | back to summary |
|---|---|
| private static DefaultLauncher createDefaultLauncher(LauncherConfig config, LauncherConfigurationParameters configurationParameters, NamespacedHierarchicalStore<Namespace> sessionLevelStore) | |
| createLauncherSessionListener | back to summary |
|---|---|
| private static LauncherSessionListener createLauncherSessionListener(LauncherConfig config) | |
| loadAndFilterTestExecutionListeners | back to summary |
|---|---|
| private static Iterable | |
| openSession | back to summary |
|---|---|
| public static LauncherSession openSession() throws PreconditionViolationException Factory method for opening a new
| |
| openSession | back to summary |
|---|---|
| public static LauncherSession openSession(LauncherConfig config) throws PreconditionViolationException Factory method for opening a new
| |
| registerLauncherDiscoveryListeners | back to summary |
|---|---|
| private static void registerLauncherDiscoveryListeners(LauncherConfig config, Launcher launcher) | |
| registerTestExecutionListeners | back to summary |
|---|---|
| private static void registerTestExecutionListeners(LauncherConfig config, Launcher launcher, LauncherConfigurationParameters configurationParameters) | |