Module org.junit.platform.launcher
Package org.junit.platform.launcher.core
Class LauncherConfig.Builder
java.lang.Object
org.junit.platform.launcher.core.LauncherConfig.Builder
- Enclosing interface:
- LauncherConfig
Builder API for
LauncherConfig
.-
Method Summary
Modifier and TypeMethodDescriptionaddLauncherDiscoveryListeners
(LauncherDiscoveryListener... listeners) Add all of the supplied launcher discovery listeners to the configuration.addLauncherSessionListeners
(LauncherSessionListener... listeners) Add all of the supplied launcher session listeners to the configuration.addPostDiscoveryFilters
(PostDiscoveryFilter... filters) Add all of the suppliedfilters
to the configuration.addTestEngines
(TestEngine... engines) Add all of the supplied test engines to the configuration.addTestExecutionListeners
(TestExecutionListener... listeners) Add all of the supplied test execution listeners to the configuration.build()
Build theLauncherConfig
that has been configured via this builder.enableLauncherDiscoveryListenerAutoRegistration
(boolean enabled) Configure the auto-registration flag for launcher discovery listeners.enableLauncherSessionListenerAutoRegistration
(boolean enabled) Configure the auto-registration flag for launcher session listeners.enablePostDiscoveryFilterAutoRegistration
(boolean enabled) Configure the auto-registration flag for post discovery filters.enableTestEngineAutoRegistration
(boolean enabled) Configure the auto-registration flag for test engines.enableTestExecutionListenerAutoRegistration
(boolean enabled) Configure the auto-registration flag for test execution listeners.
-
Method Details
-
enableLauncherSessionListenerAutoRegistration
@API(status=STABLE, since="1.10") public LauncherConfig.Builder enableLauncherSessionListenerAutoRegistration(boolean enabled) Configure the auto-registration flag for launcher session listeners.Defaults to
true
.- Parameters:
enabled
-true
if launcher session listeners should be automatically registered- Returns:
- this builder for method chaining
- Since:
- 1.8
-
enableLauncherDiscoveryListenerAutoRegistration
@API(status=STABLE, since="1.10") public LauncherConfig.Builder enableLauncherDiscoveryListenerAutoRegistration(boolean enabled) Configure the auto-registration flag for launcher discovery listeners.Defaults to
true
.- Parameters:
enabled
-true
if launcher discovery listeners should be automatically registered- Returns:
- this builder for method chaining
- Since:
- 1.8
-
enableTestExecutionListenerAutoRegistration
Configure the auto-registration flag for test execution listeners.Defaults to
true
.- Parameters:
enabled
-true
if test execution listeners should be automatically registered- Returns:
- this builder for method chaining
-
enableTestEngineAutoRegistration
Configure the auto-registration flag for test engines.Defaults to
true
.- Parameters:
enabled
-true
if test engines should be automatically registered- Returns:
- this builder for method chaining
-
enablePostDiscoveryFilterAutoRegistration
@API(status=STABLE, since="1.10") public LauncherConfig.Builder enablePostDiscoveryFilterAutoRegistration(boolean enabled) Configure the auto-registration flag for post discovery filters.Defaults to
true
.- Parameters:
enabled
-true
if post discovery filters should be automatically registered- Returns:
- this builder for method chaining
- Since:
- 1.7
-
addTestEngines
Add all of the supplied test engines to the configuration.- Parameters:
engines
- additional test engines to register; nevernull
or containingnull
- Returns:
- this builder for method chaining
-
addLauncherSessionListeners
Add all of the supplied launcher session listeners to the configuration.- Parameters:
listeners
- additional launcher session listeners to register; nevernull
or containingnull
- Returns:
- this builder for method chaining
-
addLauncherDiscoveryListeners
Add all of the supplied launcher discovery listeners to the configuration.- Parameters:
listeners
- additional launcher discovery listeners to register; nevernull
or containingnull
- Returns:
- this builder for method chaining
-
addTestExecutionListeners
Add all of the supplied test execution listeners to the configuration.- Parameters:
listeners
- additional test execution listeners to register; nevernull
or containingnull
- Returns:
- this builder for method chaining
-
addPostDiscoveryFilters
@API(status=STABLE, since="1.10") public LauncherConfig.Builder addPostDiscoveryFilters(PostDiscoveryFilter... filters) Add all of the suppliedfilters
to the configuration.- Parameters:
filters
- additional post discovery filters to register; nevernull
or containingnull
- Returns:
- this builder for method chaining
- Since:
- 1.7
-
build
Build theLauncherConfig
that has been configured via this builder.
-