Module org.junit.platform.launcher
Package org.junit.platform.launcher.core
Class InterceptingLauncher
- java.lang.Object
-
- org.junit.platform.launcher.core.DelegatingLauncher
-
- org.junit.platform.launcher.core.InterceptingLauncher
-
- All Implemented Interfaces:
Launcher
class InterceptingLauncher extends DelegatingLauncher
- Since:
- 1.10
-
-
Field Summary
Fields Modifier and Type Field Description private LauncherInterceptor
interceptor
-
Fields inherited from class org.junit.platform.launcher.core.DelegatingLauncher
delegate
-
-
Constructor Summary
Constructors Constructor Description InterceptingLauncher(Launcher delegate, LauncherInterceptor interceptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TestPlan
discover(LauncherDiscoveryRequest launcherDiscoveryRequest)
Discover tests and build aTestPlan
according to the suppliedLauncherDiscoveryRequest
by querying all registered engines and collecting their results.void
execute(LauncherDiscoveryRequest launcherDiscoveryRequest, TestExecutionListener... listeners)
Execute aTestPlan
which is built according to the suppliedLauncherDiscoveryRequest
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 suppliedTestPlan
and notify registered listeners about the progress and results of the execution.-
Methods inherited from class org.junit.platform.launcher.core.DelegatingLauncher
registerLauncherDiscoveryListeners, registerTestExecutionListeners
-
-
-
-
Field Detail
-
interceptor
private final LauncherInterceptor interceptor
-
-
Constructor Detail
-
InterceptingLauncher
InterceptingLauncher(Launcher delegate, LauncherInterceptor interceptor)
-
-
Method Detail
-
discover
public TestPlan discover(LauncherDiscoveryRequest launcherDiscoveryRequest)
Description copied from interface:Launcher
Discover tests and build aTestPlan
according to the suppliedLauncherDiscoveryRequest
by querying all registered engines and collecting their results.- Specified by:
discover
in interfaceLauncher
- Overrides:
discover
in classDelegatingLauncher
- Parameters:
launcherDiscoveryRequest
- the launcher discovery request; nevernull
- Returns:
- an unmodifiable
TestPlan
that contains all resolved identifiers from all registered engines
-
execute
public void execute(LauncherDiscoveryRequest launcherDiscoveryRequest, TestExecutionListener... listeners)
Description copied from interface:Launcher
Execute aTestPlan
which is built according to the suppliedLauncherDiscoveryRequest
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.
- Specified by:
execute
in interfaceLauncher
- Overrides:
execute
in classDelegatingLauncher
- Parameters:
launcherDiscoveryRequest
- the launcher discovery request; nevernull
listeners
- additional test execution listeners; nevernull
-
execute
public void execute(TestPlan testPlan, TestExecutionListener... listeners)
Description copied from interface:Launcher
Execute the suppliedTestPlan
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.
- Specified by:
execute
in interfaceLauncher
- Overrides:
execute
in classDelegatingLauncher
- Parameters:
testPlan
- the test plan to execute; nevernull
listeners
- additional test execution listeners; nevernull
-
-