Class UnifiedJUnit4Listener

java.lang.Object
org.junit.runner.notification.RunListener
io.github.mov2day.unifiedtest.reporting.UnifiedJUnit4Listener

public class UnifiedJUnit4Listener extends org.junit.runner.notification.RunListener
JUnit 4 test listener that integrates with UnifiedTest reporting. Captures JUnit4 test execution events and forwards them to the UnifiedTest collector and reporter.
  • Constructor Details

    • UnifiedJUnit4Listener

      public UnifiedJUnit4Listener()
  • Method Details

    • setCollectorAndReporter

      public static void setCollectorAndReporter(UnifiedTestResultCollector 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
    • testStarted

      public void testStarted(org.junit.runner.Description description)
      Overrides:
      testStarted in class org.junit.runner.notification.RunListener
    • testFailure

      public void testFailure(org.junit.runner.notification.Failure failure)
      Overrides:
      testFailure in class org.junit.runner.notification.RunListener
    • testIgnored

      public void testIgnored(org.junit.runner.Description description)
      Overrides:
      testIgnored in class org.junit.runner.notification.RunListener
    • testAssumptionFailure

      public void testAssumptionFailure(org.junit.runner.notification.Failure failure)
      Overrides:
      testAssumptionFailure in class org.junit.runner.notification.RunListener
    • testFinished

      public void testFinished(org.junit.runner.Description description)
      Overrides:
      testFinished in class org.junit.runner.notification.RunListener
    • testRunFinished

      public void testRunFinished(org.junit.runner.Result result)
      Overrides:
      testRunFinished in class org.junit.runner.notification.RunListener