Package org.junit.platform.launcher.core
Class SessionPerRequestLauncher
- java.lang.Object
-
- org.junit.platform.launcher.core.SessionPerRequestLauncher
-
- All Implemented Interfaces:
InternalLauncher,Launcher
class SessionPerRequestLauncher extends java.lang.Object implements InternalLauncher
- Since:
- 1.8
-
-
Field Summary
Fields Modifier and Type Field Description private InternalLauncherdelegateprivate LauncherSessionListenersessionListener
-
Constructor Summary
Constructors Constructor Description SessionPerRequestLauncher(InternalLauncher delegate, LauncherSessionListener sessionListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private LauncherSessioncreateSession()TestPlandiscover(LauncherDiscoveryRequest launcherDiscoveryRequest)Discover tests and build aTestPlanaccording to the suppliedLauncherDiscoveryRequestby querying all registered engines and collecting their results.voidexecute(LauncherDiscoveryRequest launcherDiscoveryRequest, TestExecutionListener... listeners)Execute aTestPlanwhich is built according to the suppliedLauncherDiscoveryRequestby querying all registered engines and collecting their results, and notify registered listeners about the progress and results of the execution.voidexecute(TestPlan testPlan, TestExecutionListener... listeners)Execute the suppliedTestPlanand notify registered listeners about the progress and results of the execution.ListenerRegistry<LauncherDiscoveryListener>getLauncherDiscoveryListenerRegistry()ListenerRegistry<TestExecutionListener>getTestExecutionListenerRegistry()voidregisterLauncherDiscoveryListeners(LauncherDiscoveryListener... listeners)Register one or more listeners for test discovery.voidregisterTestExecutionListeners(TestExecutionListener... listeners)Register one or more listeners for test execution.
-
-
-
Field Detail
-
delegate
private final InternalLauncher delegate
-
sessionListener
private final LauncherSessionListener sessionListener
-
-
Constructor Detail
-
SessionPerRequestLauncher
SessionPerRequestLauncher(InternalLauncher delegate, LauncherSessionListener sessionListener)
-
-
Method Detail
-
registerLauncherDiscoveryListeners
public void registerLauncherDiscoveryListeners(LauncherDiscoveryListener... listeners)
Description copied from interface:LauncherRegister one or more listeners for test discovery.- Specified by:
registerLauncherDiscoveryListenersin interfaceLauncher- Parameters:
listeners- the listeners to be notified of test discovery events; nevernullor empty
-
registerTestExecutionListeners
public void registerTestExecutionListeners(TestExecutionListener... listeners)
Description copied from interface:LauncherRegister one or more listeners for test execution.- Specified by:
registerTestExecutionListenersin interfaceLauncher- Parameters:
listeners- the listeners to be notified of test execution events; nevernullor empty
-
discover
public TestPlan discover(LauncherDiscoveryRequest launcherDiscoveryRequest)
Description copied from interface:LauncherDiscover tests and build aTestPlanaccording to the suppliedLauncherDiscoveryRequestby querying all registered engines and collecting their results.- Specified by:
discoverin interfaceLauncher- Parameters:
launcherDiscoveryRequest- the launcher discovery request; nevernull- Returns:
- an unmodifiable
TestPlanthat contains all resolved identifiers from all registered engines
-
execute
public void execute(LauncherDiscoveryRequest launcherDiscoveryRequest, TestExecutionListener... listeners)
Description copied from interface:LauncherExecute aTestPlanwhich is built according to the suppliedLauncherDiscoveryRequestby 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.
-
execute
public void execute(TestPlan testPlan, TestExecutionListener... listeners)
Description copied from interface:LauncherExecute the suppliedTestPlanand 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.
-
getTestExecutionListenerRegistry
public ListenerRegistry<TestExecutionListener> getTestExecutionListenerRegistry()
- Specified by:
getTestExecutionListenerRegistryin interfaceInternalLauncher
-
getLauncherDiscoveryListenerRegistry
public ListenerRegistry<LauncherDiscoveryListener> getLauncherDiscoveryListenerRegistry()
- Specified by:
getLauncherDiscoveryListenerRegistryin interfaceInternalLauncher
-
createSession
private LauncherSession createSession()
-
-