Package org.junit.platform.launcher.core
Interface LauncherConfig
-
@API(status=STABLE, since="1.7") public interface LauncherConfigLauncherConfigdefines the configuration API for creatingLauncherinstances via theLauncherFactory.Example
LauncherConfig launcherConfig = LauncherConfig.builder() .enableTestEngineAutoRegistration(false) .enableTestExecutionListenerAutoRegistration(false) .addTestEngines(new CustomTestEngine()) .addTestExecutionListeners(new CustomTestExecutionListener()) .build(); Launcher launcher = LauncherFactory.create(launcherConfig); LauncherDiscoveryRequest discoveryRequest = ... launcher.execute(discoveryRequest);
- Since:
- 1.3
- See Also:
builder(),Launcher,LauncherFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classLauncherConfig.BuilderBuilder API forLauncherConfig.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static LauncherConfig.Builderbuilder()Create a newLauncherConfig.Builder.java.util.Collection<PostDiscoveryFilter>getAdditionalPostDiscoveryFilters()Get the collection of additional post discovery filters that should be added to theLauncher.java.util.Collection<org.junit.platform.engine.TestEngine>getAdditionalTestEngines()Get the collection of additional test engines that should be added to theLauncher.java.util.Collection<TestExecutionListener>getAdditionalTestExecutionListeners()Get the collection of additional test execution listeners that should be added to theLauncher.booleanisPostDiscoveryFilterAutoRegistrationEnabled()Determine if post discovery filters should be discovered at runtime using theServiceLoadermechanism and automatically registered.booleanisTestEngineAutoRegistrationEnabled()Determine if test engines should be discovered at runtime using theServiceLoadermechanism and automatically registered.booleanisTestExecutionListenerAutoRegistrationEnabled()Determine if test execution listeners should be discovered at runtime using theServiceLoadermechanism and automatically registered.
-
-
-
Method Detail
-
isTestEngineAutoRegistrationEnabled
boolean isTestEngineAutoRegistrationEnabled()
Determine if test engines should be discovered at runtime using theServiceLoadermechanism and automatically registered.- Returns:
trueif test engines should be automatically registered
-
isTestExecutionListenerAutoRegistrationEnabled
boolean isTestExecutionListenerAutoRegistrationEnabled()
Determine if test execution listeners should be discovered at runtime using theServiceLoadermechanism and automatically registered.- Returns:
trueif test execution listeners should be automatically registered
-
isPostDiscoveryFilterAutoRegistrationEnabled
@API(status=EXPERIMENTAL, since="1.7") boolean isPostDiscoveryFilterAutoRegistrationEnabled()Determine if post discovery filters should be discovered at runtime using theServiceLoadermechanism and automatically registered.- Returns:
trueif post discovery filters should be automatically registered
-
getAdditionalTestEngines
java.util.Collection<org.junit.platform.engine.TestEngine> getAdditionalTestEngines()
Get the collection of additional test engines that should be added to theLauncher.- Returns:
- the collection of additional test engines; never
nullbut potentially empty
-
getAdditionalTestExecutionListeners
java.util.Collection<TestExecutionListener> getAdditionalTestExecutionListeners()
Get the collection of additional test execution listeners that should be added to theLauncher.- Returns:
- the collection of additional test execution listeners; never
nullbut potentially empty
-
getAdditionalPostDiscoveryFilters
@API(status=EXPERIMENTAL, since="1.7") java.util.Collection<PostDiscoveryFilter> getAdditionalPostDiscoveryFilters()Get the collection of additional post discovery filters that should be added to theLauncher.- Returns:
- the collection of additional post discovery filters; never
nullbut potentially empty
-
builder
static LauncherConfig.Builder builder()
Create a newLauncherConfig.Builder.- Returns:
- a new builder; never
null
-
-