Package io.quarkus.test.junit.launcher
Class CustomLauncherInterceptor
java.lang.Object
io.quarkus.test.junit.launcher.CustomLauncherInterceptor
- All Implemented Interfaces:
org.junit.platform.engine.EngineDiscoveryListener,org.junit.platform.launcher.LauncherDiscoveryListener,org.junit.platform.launcher.LauncherSessionListener,org.junit.platform.launcher.TestExecutionListener
public class CustomLauncherInterceptor
extends Object
implements org.junit.platform.launcher.LauncherDiscoveryListener, org.junit.platform.launcher.LauncherSessionListener, org.junit.platform.launcher.TestExecutionListener
-
Field Summary
Fields inherited from interface org.junit.platform.launcher.LauncherDiscoveryListener
NOOPFields inherited from interface org.junit.platform.launcher.LauncherSessionListener
NOOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidlauncherDiscoveryFinished(org.junit.platform.launcher.LauncherDiscoveryRequest request) voidlauncherDiscoveryStarted(org.junit.platform.launcher.LauncherDiscoveryRequest request) voidlauncherSessionClosed(org.junit.platform.launcher.LauncherSession session) voidlauncherSessionOpened(org.junit.platform.launcher.LauncherSession session) voidtestPlanExecutionFinished(org.junit.platform.launcher.TestPlan testPlan) Called when the execution of theTestPlanhas finished, after all tests have been executed.voidtestPlanExecutionStarted(org.junit.platform.launcher.TestPlan testPlan) Called when the execution of theTestPlanhas started, before any test has been executed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.junit.platform.engine.EngineDiscoveryListener
issueEncountered, selectorProcessedMethods inherited from interface org.junit.platform.launcher.LauncherDiscoveryListener
engineDiscoveryFinished, engineDiscoveryStartedMethods inherited from interface org.junit.platform.launcher.TestExecutionListener
dynamicTestRegistered, executionFinished, executionSkipped, executionStarted, fileEntryPublished, reportingEntryPublished
-
Constructor Details
-
CustomLauncherInterceptor
public CustomLauncherInterceptor()
-
-
Method Details
-
launcherSessionOpened
public void launcherSessionOpened(org.junit.platform.launcher.LauncherSession session) - Specified by:
launcherSessionOpenedin interfaceorg.junit.platform.launcher.LauncherSessionListener
-
launcherDiscoveryStarted
public void launcherDiscoveryStarted(org.junit.platform.launcher.LauncherDiscoveryRequest request) - Specified by:
launcherDiscoveryStartedin interfaceorg.junit.platform.launcher.LauncherDiscoveryListener
-
launcherDiscoveryFinished
public void launcherDiscoveryFinished(org.junit.platform.launcher.LauncherDiscoveryRequest request) - Specified by:
launcherDiscoveryFinishedin interfaceorg.junit.platform.launcher.LauncherDiscoveryListener
-
launcherSessionClosed
public void launcherSessionClosed(org.junit.platform.launcher.LauncherSession session) - Specified by:
launcherSessionClosedin interfaceorg.junit.platform.launcher.LauncherSessionListener
-
testPlanExecutionStarted
public void testPlanExecutionStarted(org.junit.platform.launcher.TestPlan testPlan) Called when the execution of theTestPlanhas started, before any test has been executed.Called from the same thread as
testPlanExecutionFinished(TestPlan). In continuous testing, the test plan listener seems not to be called, perhaps because of a different execution model.- Specified by:
testPlanExecutionStartedin interfaceorg.junit.platform.launcher.TestExecutionListener- Parameters:
testPlan- describes the tree of tests about to be executed
-
testPlanExecutionFinished
public void testPlanExecutionFinished(org.junit.platform.launcher.TestPlan testPlan) Called when the execution of theTestPlanhas finished, after all tests have been executed.Called from the same thread as
testPlanExecutionStarted(TestPlan). If tests failed and are rerun by surefire, the same session will be used for all runs, so we need to get rid of the FacadeClassLoader associated with the previous run, since its app will be closed and its classloaders will all be stale. In continuous testing, the test plan listener seems not to be called, perhaps because of a different execution model.- Specified by:
testPlanExecutionFinishedin interfaceorg.junit.platform.launcher.TestExecutionListener- Parameters:
testPlan- describes the tree of tests that have been executed
-