class DefaultLauncher extends java.lang.Object implements Launcher
Launcher API.
External clients can obtain an instance by invoking
LauncherFactory.create().
Launcher,
LauncherFactory| Modifier and Type | Field and Description |
|---|---|
private EngineDiscoveryOrchestrator |
discoveryOrchestrator |
private EngineExecutionOrchestrator |
executionOrchestrator |
private LauncherListenerRegistry |
listenerRegistry |
| Constructor and Description |
|---|
DefaultLauncher(java.lang.Iterable<TestEngine> testEngines,
java.util.Collection<PostDiscoveryFilter> postDiscoveryFilters)
Construct a new
DefaultLauncher with the supplied test engines. |
| Modifier and Type | Method and Description |
|---|---|
TestPlan |
discover(LauncherDiscoveryRequest discoveryRequest)
Discover tests and build a
TestPlan according to the supplied
LauncherDiscoveryRequest by querying all registered engines and
collecting their results. |
private LauncherDiscoveryResult |
discover(LauncherDiscoveryRequest discoveryRequest,
EngineDiscoveryOrchestrator.Phase phase) |
private void |
execute(InternalTestPlan internalTestPlan,
TestExecutionListener[] listeners) |
void |
execute(LauncherDiscoveryRequest discoveryRequest,
TestExecutionListener... listeners)
Execute a
TestPlan which is built according to the supplied
LauncherDiscoveryRequest by querying all registered engines and
collecting their results, and notify
registered listeners about
the progress and results of the execution. |
void |
execute(TestPlan testPlan,
TestExecutionListener... listeners)
Execute the supplied
TestPlan and notify
registered listeners about
the progress and results of the execution. |
void |
registerLauncherDiscoveryListeners(LauncherDiscoveryListener... listeners)
Register one or more listeners for test discovery.
|
void |
registerTestExecutionListeners(TestExecutionListener... listeners)
Register one or more listeners for test execution.
|
private final LauncherListenerRegistry listenerRegistry
private final EngineExecutionOrchestrator executionOrchestrator
private final EngineDiscoveryOrchestrator discoveryOrchestrator
DefaultLauncher(java.lang.Iterable<TestEngine> testEngines, java.util.Collection<PostDiscoveryFilter> postDiscoveryFilters)
DefaultLauncher with the supplied test engines.testEngines - the test engines to delegate to; never null or
emptypostDiscoveryFilters - the additional post discovery filters for
discovery requests; never nullpublic void registerLauncherDiscoveryListeners(LauncherDiscoveryListener... listeners)
LauncherregisterLauncherDiscoveryListeners in interface Launcherlisteners - the listeners to be notified of test discovery events;
never null or emptypublic void registerTestExecutionListeners(TestExecutionListener... listeners)
LauncherregisterTestExecutionListeners in interface Launcherlisteners - the listeners to be notified of test execution events;
never null or emptypublic TestPlan discover(LauncherDiscoveryRequest discoveryRequest)
LauncherTestPlan according to the supplied
LauncherDiscoveryRequest by querying all registered engines and
collecting their results.discover in interface LauncherdiscoveryRequest - the launcher discovery request; never
nullTestPlan that contains all resolved
identifiers from all registered enginespublic void execute(LauncherDiscoveryRequest discoveryRequest, TestExecutionListener... listeners)
LauncherTestPlan which is built according to the supplied
LauncherDiscoveryRequest by querying all registered engines and
collecting their results, and notify
registered listeners about
the progress and results of the execution.
Supplied test execution listeners are registered in addition to already registered listeners but only for the supplied launcher discovery request.
public void execute(TestPlan testPlan, TestExecutionListener... listeners)
LauncherTestPlan and notify
registered listeners about
the progress and results of the execution.
Supplied test execution listeners are registered in addition to already registered listeners but only for the execution of the supplied test plan.
private LauncherDiscoveryResult discover(LauncherDiscoveryRequest discoveryRequest, EngineDiscoveryOrchestrator.Phase phase)
private void execute(InternalTestPlan internalTestPlan, TestExecutionListener[] listeners)