Class UnifiedJUnit5Listener

java.lang.Object
io.github.mov2day.unifiedtest.reporting.UnifiedJUnit5Listener
All Implemented Interfaces:
org.junit.platform.launcher.TestExecutionListener

public class UnifiedJUnit5Listener extends Object implements org.junit.platform.launcher.TestExecutionListener
JUnit 5 test listener that integrates with UnifiedTest reporting. Captures JUnit5 test execution events and forwards them to the UnifiedTest collector and reporter.
  • Constructor Details

    • UnifiedJUnit5Listener

      public UnifiedJUnit5Listener()
      Default constructor required for ServiceLoader.
  • Method Details

    • setCollectorAndReporter

      public static void setCollectorAndReporter(ITestResultCollector collector, ConsoleReporter reporter)
      Sets the collector and reporter for the listener. This method should be called before test execution starts.
      Parameters:
      collector - the test result collector
      reporter - the console reporter
    • testPlanExecutionStarted

      public void testPlanExecutionStarted(org.junit.platform.launcher.TestPlan testPlan)
      Specified by:
      testPlanExecutionStarted in interface org.junit.platform.launcher.TestExecutionListener
    • executionStarted

      public void executionStarted(org.junit.platform.launcher.TestIdentifier testIdentifier)
      Specified by:
      executionStarted in interface org.junit.platform.launcher.TestExecutionListener
    • executionSkipped

      public void executionSkipped(org.junit.platform.launcher.TestIdentifier testIdentifier, String reason)
      Specified by:
      executionSkipped in interface org.junit.platform.launcher.TestExecutionListener
    • executionFinished

      public void executionFinished(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.TestExecutionResult testExecutionResult)
      Specified by:
      executionFinished in interface org.junit.platform.launcher.TestExecutionListener
    • testPlanExecutionFinished

      public void testPlanExecutionFinished(org.junit.platform.launcher.TestPlan testPlan)
      Specified by:
      testPlanExecutionFinished in interface org.junit.platform.launcher.TestExecutionListener