Class JUnitCoreRunListener

java.lang.Object
org.junit.runner.notification.RunListener
org.apache.maven.surefire.common.junit4.JUnit4RunListener
org.apache.maven.surefire.junitcore.JUnitCoreRunListener
All Implemented Interfaces:
TestOutputReceiver<OutputReportEntry>, RunModeSetter

final class JUnitCoreRunListener extends JUnit4RunListener
Noteworthy things about JUnit4 listening:
A class that is annotated with @Ignore will have one invocation of "testSkipped" with source==name A method that is annotated with @Ignore will have a invocation of testSkipped with source and name distinct Methods annotated with @Ignore trigger no further events.
See Also:
  • Field Details

  • Constructor Details

    • JUnitCoreRunListener

      JUnitCoreRunListener(ConcurrentRunListener reporter, Map<String,TestSet> classMethodCounts)
      Parameters:
      reporter - the report manager to log testing events to
      classMethodCounts - A map of methods
  • Method Details

    • testRunStarted

      public void testRunStarted(org.junit.runner.Description description) throws Exception
      Called right before any tests from a specific class are run.
      Overrides:
      testRunStarted in class org.junit.runner.notification.RunListener
      Throws:
      Exception
      See Also:
      • RunListener.testRunStarted(org.junit.runner.Description)
    • testRunFinished

      public void testRunFinished(org.junit.runner.Result result) throws Exception
      Overrides:
      testRunFinished in class org.junit.runner.notification.RunListener
      Throws:
      Exception
    • fillTestCountMap

      private void fillTestCountMap(org.junit.runner.Description testDesc)
    • asTestLeaf

      private boolean asTestLeaf(org.junit.runner.Description description)
    • createStackTraceWriter

      protected StackTraceWriter createStackTraceWriter(org.junit.runner.notification.Failure failure)
      Overrides:
      createStackTraceWriter in class JUnit4RunListener