Class JUnit4RunListener


  • public class JUnit4RunListener
    extends org.junit.runner.notification.RunListener
    RunListener for JUnit4, delegates to our own RunListener
    • Nested Class Summary

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

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

      Fields 
      Modifier and Type Field Description
      protected org.apache.maven.surefire.report.RunListener reporter  
    • Constructor Summary

      Constructors 
      Constructor Description
      JUnit4RunListener​(org.apache.maven.surefire.report.RunListener reporter)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.apache.maven.surefire.report.SimpleReportEntry createReportEntry​(org.junit.runner.Description 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)  
      static void rethrowAnyTestMechanismFailures​(org.junit.runner.Result run)  
      void testAssumptionFailure​(org.junit.runner.notification.Failure failure)  
      void testExecutionSkippedByUser()
      Delegates to RunListener.testExecutionSkippedByUser().
      void testFailure​(org.junit.runner.notification.Failure failure)
      Called when a specific test has failed.
      void testFinished​(org.junit.runner.Description description)
      Called after a specific test has finished.
      void testIgnored​(org.junit.runner.Description description)
      Called when a specific test has been skipped (for whatever reason).
      void testStarted​(org.junit.runner.Description description)
      Called when a specific test has started.
      • Methods inherited from class org.junit.runner.notification.RunListener

        testRunFinished, testRunStarted
      • Methods inherited from class java.lang.Object

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

      • reporter

        protected final org.apache.maven.surefire.report.RunListener reporter
    • Constructor Detail

      • JUnit4RunListener

        public JUnit4RunListener​(org.apache.maven.surefire.report.RunListener reporter)
        Constructor.
        Parameters:
        reporter - the reporter to log testing events to
    • Method Detail

      • testIgnored

        public void testIgnored​(org.junit.runner.Description description)
                         throws java.lang.Exception
        Called when a specific test has been skipped (for whatever reason).
        Overrides:
        testIgnored in class org.junit.runner.notification.RunListener
        Throws:
        java.lang.Exception
        See Also:
        RunListener.testIgnored(org.junit.runner.Description)
      • testStarted

        public void testStarted​(org.junit.runner.Description description)
                         throws java.lang.Exception
        Called when a specific test has started.
        Overrides:
        testStarted in class org.junit.runner.notification.RunListener
        Throws:
        java.lang.Exception
        See Also:
        RunListener.testStarted(org.junit.runner.Description)
      • testFailure

        public void testFailure​(org.junit.runner.notification.Failure failure)
                         throws java.lang.Exception
        Called when a specific test has failed.
        Overrides:
        testFailure in class org.junit.runner.notification.RunListener
        Throws:
        java.lang.Exception
        See Also:
        RunListener.testFailure(org.junit.runner.notification.Failure)
      • 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)
                          throws java.lang.Exception
        Called after a specific test has finished.
        Overrides:
        testFinished in class org.junit.runner.notification.RunListener
        Throws:
        java.lang.Exception
        See Also:
        RunListener.testFinished(org.junit.runner.Description)
      • testExecutionSkippedByUser

        public void testExecutionSkippedByUser()
        Delegates to RunListener.testExecutionSkippedByUser().
      • createStackTraceWriter

        protected org.apache.maven.surefire.report.StackTraceWriter createStackTraceWriter​(org.junit.runner.notification.Failure failure)
      • createReportEntry

        protected org.apache.maven.surefire.report.SimpleReportEntry createReportEntry​(org.junit.runner.Description description)
      • extractDescriptionClassName

        protected java.lang.String extractDescriptionClassName​(org.junit.runner.Description description)
      • extractDescriptionMethodName

        protected java.lang.String extractDescriptionMethodName​(org.junit.runner.Description description)
      • rethrowAnyTestMechanismFailures

        public static void rethrowAnyTestMechanismFailures​(org.junit.runner.Result run)
                                                    throws org.apache.maven.surefire.testset.TestSetFailedException
        Throws:
        org.apache.maven.surefire.testset.TestSetFailedException