@API(status=STABLE,
since="1.7")
public interface LauncherConfig
LauncherConfig defines the configuration API for creating
Launcher instances via the LauncherFactory.
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);
builder(),
Launcher,
LauncherFactory| Modifier and Type | Interface and Description |
|---|---|
static class |
LauncherConfig.Builder
Builder API for
LauncherConfig. |
| Modifier and Type | Field and Description |
|---|---|
static LauncherConfig |
DEFAULT
The default
LauncherConfig which uses automatic registration for
test engines, supported listeners, and post-discovery filters. |
| Modifier and Type | Method and Description |
|---|---|
static LauncherConfig.Builder |
builder()
Create a new
LauncherConfig.Builder. |
java.util.Collection<LauncherDiscoveryListener> |
getAdditionalLauncherDiscoveryListeners()
Get the collection of additional launcher discovery listeners that should
be added to the
Launcher. |
java.util.Collection<LauncherSessionListener> |
getAdditionalLauncherSessionListeners()
Get the collection of additional launcher session listeners that should
be added to the
Launcher. |
java.util.Collection<PostDiscoveryFilter> |
getAdditionalPostDiscoveryFilters()
Get the collection of additional post discovery filters that should be
added to the
Launcher. |
java.util.Collection<TestEngine> |
getAdditionalTestEngines()
Get the collection of additional test engines that should be added to
the
Launcher. |
java.util.Collection<TestExecutionListener> |
getAdditionalTestExecutionListeners()
Get the collection of additional test execution listeners that should be
added to the
Launcher. |
boolean |
isLauncherDiscoveryListenerAutoRegistrationEnabled()
Determine if launcher discovery listeners should be discovered at runtime
using the
ServiceLoader mechanism and
automatically registered. |
boolean |
isLauncherSessionListenerAutoRegistrationEnabled()
Determine if launcher session listeners should be discovered at runtime
using the
ServiceLoader mechanism and
automatically registered. |
boolean |
isPostDiscoveryFilterAutoRegistrationEnabled()
Determine if post discovery filters should be discovered at runtime
using the
ServiceLoader mechanism and
automatically registered. |
boolean |
isTestEngineAutoRegistrationEnabled()
Determine if test engines should be discovered at runtime using the
ServiceLoader mechanism and
automatically registered. |
boolean |
isTestExecutionListenerAutoRegistrationEnabled()
Determine if test execution listeners should be discovered at runtime
using the
ServiceLoader mechanism and
automatically registered. |
static final LauncherConfig DEFAULT
LauncherConfig which uses automatic registration for
test engines, supported listeners, and post-discovery filters.boolean isTestEngineAutoRegistrationEnabled()
ServiceLoader mechanism and
automatically registered.true if test engines should be automatically registered@API(status=STABLE,
since="1.10")
boolean isLauncherSessionListenerAutoRegistrationEnabled()
ServiceLoader mechanism and
automatically registered.true if launcher session listeners should be
automatically registered@API(status=STABLE,
since="1.10")
boolean isLauncherDiscoveryListenerAutoRegistrationEnabled()
ServiceLoader mechanism and
automatically registered.true if launcher discovery listeners should be
automatically registeredboolean isTestExecutionListenerAutoRegistrationEnabled()
ServiceLoader mechanism and
automatically registered.true if test execution listeners should be automatically
registered@API(status=STABLE,
since="1.10")
boolean isPostDiscoveryFilterAutoRegistrationEnabled()
ServiceLoader mechanism and
automatically registered.true if post discovery filters should be automatically
registeredjava.util.Collection<TestEngine> getAdditionalTestEngines()
Launcher.null but
potentially empty@API(status=STABLE,
since="1.10")
java.util.Collection<LauncherSessionListener> getAdditionalLauncherSessionListeners()
Launcher.null but potentially empty@API(status=STABLE,
since="1.10")
java.util.Collection<LauncherDiscoveryListener> getAdditionalLauncherDiscoveryListeners()
Launcher.null but potentially emptyjava.util.Collection<TestExecutionListener> getAdditionalTestExecutionListeners()
Launcher.null but potentially empty@API(status=STABLE,
since="1.10")
java.util.Collection<PostDiscoveryFilter> getAdditionalPostDiscoveryFilters()
Launcher.null but potentially emptystatic LauncherConfig.Builder builder()
LauncherConfig.Builder.null