Class JUnitCoreRunListener


  • public class JUnitCoreRunListener
    extends org.apache.maven.surefire.common.junit4.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:
    for details about parallel running
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.junit.runner.notification.RunListener

        org.junit.runner.notification.RunListener.ThreadSafe
    • Field Summary

      • Fields inherited from class org.apache.maven.surefire.common.junit4.JUnit4RunListener

        reporter
    • Constructor Summary

      Constructors 
      Constructor Description
      JUnitCoreRunListener​(org.apache.maven.surefire.report.RunListener reporter, java.util.Map<java.lang.String,​TestSet> classMethodCounts)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.apache.maven.surefire.report.StackTraceWriter createStackTraceWriter​(org.junit.runner.notification.Failure failure)  
      protected java.lang.String extractDescriptionClassName​(org.junit.runner.Description description)  
      protected java.lang.String extractDescriptionMethodName​(org.junit.runner.Description description)  
      void testRunFinished​(org.junit.runner.Result result)  
      void testRunStarted​(org.junit.runner.Description description)
      Called right before any tests from a specific class are run.
      • Methods inherited from class org.apache.maven.surefire.common.junit4.JUnit4RunListener

        createReportEntry, rethrowAnyTestMechanismFailures, testAssumptionFailure, testExecutionSkippedByUser, testFailure, testFinished, testIgnored, testStarted
      • Methods inherited from class org.junit.runner.notification.RunListener

        testSuiteFinished, testSuiteStarted
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JUnitCoreRunListener

        public JUnitCoreRunListener​(org.apache.maven.surefire.report.RunListener reporter,
                                    java.util.Map<java.lang.String,​TestSet> classMethodCounts)
        Parameters:
        reporter - the report manager to log testing events to
        classMethodCounts - A map of methods
    • Method Detail

      • testRunStarted

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

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

        protected org.apache.maven.surefire.report.StackTraceWriter createStackTraceWriter​(org.junit.runner.notification.Failure failure)
        Overrides:
        createStackTraceWriter in class org.apache.maven.surefire.common.junit4.JUnit4RunListener
      • extractDescriptionClassName

        protected java.lang.String extractDescriptionClassName​(org.junit.runner.Description description)
        Overrides:
        extractDescriptionClassName in class org.apache.maven.surefire.common.junit4.JUnit4RunListener
      • extractDescriptionMethodName

        protected java.lang.String extractDescriptionMethodName​(org.junit.runner.Description description)
        Overrides:
        extractDescriptionMethodName in class org.apache.maven.surefire.common.junit4.JUnit4RunListener