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

    NOOP

    Fields inherited from interface org.junit.platform.launcher.LauncherSessionListener

    NOOP
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    launcherDiscoveryFinished(org.junit.platform.launcher.LauncherDiscoveryRequest request)
     
    void
    launcherDiscoveryStarted(org.junit.platform.launcher.LauncherDiscoveryRequest request)
     
    void
    launcherSessionClosed(org.junit.platform.launcher.LauncherSession session)
     
    void
    launcherSessionOpened(org.junit.platform.launcher.LauncherSession session)
     
    void
    testPlanExecutionFinished(org.junit.platform.launcher.TestPlan testPlan)
    Called when the execution of the TestPlan has finished, after all tests have been executed.
    void
    testPlanExecutionStarted(org.junit.platform.launcher.TestPlan testPlan)
    Called when the execution of the TestPlan has started, before any test has been executed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.junit.platform.engine.EngineDiscoveryListener

    issueEncountered, selectorProcessed

    Methods inherited from interface org.junit.platform.launcher.LauncherDiscoveryListener

    engineDiscoveryFinished, engineDiscoveryStarted

    Methods 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:
      launcherSessionOpened in interface org.junit.platform.launcher.LauncherSessionListener
    • launcherDiscoveryStarted

      public void launcherDiscoveryStarted(org.junit.platform.launcher.LauncherDiscoveryRequest request)
      Specified by:
      launcherDiscoveryStarted in interface org.junit.platform.launcher.LauncherDiscoveryListener
    • launcherDiscoveryFinished

      public void launcherDiscoveryFinished(org.junit.platform.launcher.LauncherDiscoveryRequest request)
      Specified by:
      launcherDiscoveryFinished in interface org.junit.platform.launcher.LauncherDiscoveryListener
    • launcherSessionClosed

      public void launcherSessionClosed(org.junit.platform.launcher.LauncherSession session)
      Specified by:
      launcherSessionClosed in interface org.junit.platform.launcher.LauncherSessionListener
    • testPlanExecutionStarted

      public void testPlanExecutionStarted(org.junit.platform.launcher.TestPlan testPlan)
      Called when the execution of the TestPlan has 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:
      testPlanExecutionStarted in interface org.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 the TestPlan has 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:
      testPlanExecutionFinished in interface org.junit.platform.launcher.TestExecutionListener
      Parameters:
      testPlan - describes the tree of tests that have been executed