Package org.junit.platform.launcher
Interface LauncherDiscoveryListener
-
- All Superinterfaces:
EngineDiscoveryListener
- All Known Implementing Classes:
AbortOnFailureLauncherDiscoveryListener,CompositeLauncherDiscoveryListener,DiscoveryIssueCollector,LoggingLauncherDiscoveryListener
@API(status=STABLE, since="1.11") public interface LauncherDiscoveryListener extends EngineDiscoveryListenerRegister a concrete implementation of this interface with aLauncherDiscoveryRequestBuilderorLauncherto be notified of events that occur during test discovery.All methods in this interface have empty default implementations. Concrete implementations may therefore override one or more of these methods to be notified of the selected events.
JUnit provides default implementations that are created via the factory methods in
LauncherDiscoveryListeners.The methods declared in this interface are called by the
Launchercreated via theLauncherFactoryduring test discovery.
-
-
Field Summary
Fields Modifier and Type Field Description static LauncherDiscoveryListenerNOOPNo-op implementation ofLauncherDiscoveryListener
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidengineDiscoveryFinished(UniqueId engineId, EngineDiscoveryResult result)Called when test discovery has finished for an engine.default voidengineDiscoveryStarted(UniqueId engineId)Called when test discovery is about to be started for an engine.default voidlauncherDiscoveryFinished(LauncherDiscoveryRequest request)Called when test discovery has finished.default voidlauncherDiscoveryStarted(LauncherDiscoveryRequest request)Called when test discovery is about to be started.-
Methods inherited from interface org.junit.platform.engine.EngineDiscoveryListener
issueEncountered, selectorProcessed
-
-
-
-
Field Detail
-
NOOP
static final LauncherDiscoveryListener NOOP
No-op implementation ofLauncherDiscoveryListener
-
-
Method Detail
-
launcherDiscoveryStarted
@API(status=STABLE, since="1.10") default void launcherDiscoveryStarted(LauncherDiscoveryRequest request)Called when test discovery is about to be started.- Parameters:
request- the request for which discovery is being started- Since:
- 1.8
-
launcherDiscoveryFinished
@API(status=STABLE, since="1.10") default void launcherDiscoveryFinished(LauncherDiscoveryRequest request)Called when test discovery has finished.- Parameters:
request- the request for which discovery has finished- Since:
- 1.8
-
engineDiscoveryStarted
default void engineDiscoveryStarted(UniqueId engineId)
Called when test discovery is about to be started for an engine.- Parameters:
engineId- the unique ID of the engine descriptor
-
engineDiscoveryFinished
default void engineDiscoveryFinished(UniqueId engineId, EngineDiscoveryResult result)
Called when test discovery has finished for an engine.Exceptions thrown by implementations of this method will cause the complete test discovery to be aborted.
- Parameters:
engineId- the unique ID of the engine descriptorresult- the discovery result of the supplied engine- See Also:
EngineDiscoveryResult
-
-