Class SeqRunListener

    • Nested Class Summary

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void testAssumptionFailure​(org.junit.runner.notification.Failure failure)
      Called when an atomic test flags that it assumes a condition that is false.
      void testClassStructureLoaded​(org.junit.runner.Description desc)
      Invoked if a test class is loaded defining a testsuite described by desc.
      void testFailure​(org.junit.runner.notification.Failure failure)
      Called when an atomic test fails to execute properly throwing a Throwable, or when a listener throws an exception.
      void testFinished​(org.junit.runner.Description desc)
      Called when an atomic test has finished, whether the test succeeds or fails.
      void testIgnored​(org.junit.runner.Description desc)
      Called when a test will not be run, generally because a test method is annotated with Ignore.
      void testRunAborted()
      Invoked for stop and for break originated by the user.
      void testRunFinished​(org.junit.runner.Result result)
      Called when all tests of the suite announced by testRunStarted(Description) have finished.
      void testRunStarted​(org.junit.runner.Description desc)
      Called before any tests of a suite described by desc have been run.
      void testStarted​(org.junit.runner.Description desc)
      Called when an atomic test is about to be started.
      void testSuiteFinished​(org.junit.runner.Description desc)
      Called when a test suite has finished, whether the test suite succeeds or fails.
      void testSuiteStarted​(org.junit.runner.Description desc)
      Called when a test suite is about to be started.
    • Method Detail

      • testRunStarted

        public void testRunStarted​(org.junit.runner.Description desc)
                            throws Exception
        Called before any tests of a suite described by desc have been run. This may be called on an arbitrary thread.
        Overrides:
        testRunStarted in class org.junit.runner.notification.RunListener
        Parameters:
        desc - describes the suite of tests to be run.
        Throws:
        Exception
      • testRunFinished

        public void testRunFinished​(org.junit.runner.Result result)
                             throws Exception
        Called when all tests of the suite announced by testRunStarted(Description) have finished. This may be called on an arbitrary thread.
        Overrides:
        testRunFinished in class org.junit.runner.notification.RunListener
        Parameters:
        result - the summary of the outcoming of the suite of tests run, including all the tests that failed
        Throws:
        Exception
      • testSuiteStarted

        public void testSuiteStarted​(org.junit.runner.Description desc)
                              throws Exception
        Called when a test suite is about to be started. If this method is called for a given Description, then testSuiteFinished(Description) will also be called for the same Description.

        Note that not all runners will call this method, so runners should be prepared to handle testStarted(Description) calls for tests where there was no corresponding testSuiteStarted(Description) call for the parent Description.

        Overrides:
        testSuiteStarted in class ExtRunListener
        Parameters:
        desc - the description of the test suite that is about to be run (generally a class name)
        Throws:
        Exception
        Since:
        4.13
      • testSuiteFinished

        public void testSuiteFinished​(org.junit.runner.Description desc)
                               throws Exception
        Called when a test suite has finished, whether the test suite succeeds or fails. This method will not be called for a given Description unless testSuiteStarted(Description) was called for the same Description.
        Overrides:
        testSuiteFinished in class ExtRunListener
        Parameters:
        desc - the description of the test suite that just ran
        Throws:
        Exception
        Since:
        4.13
      • testStarted

        public void testStarted​(org.junit.runner.Description desc)
                         throws Exception
        Called when an atomic test is about to be started. An ignored test is never started.
        Overrides:
        testStarted in class org.junit.runner.notification.RunListener
        Parameters:
        desc - the description of the test that is about to be run (generally a class and method name)
        Throws:
        Exception
        See Also:
        testIgnored(Description)
      • testFinished

        public void testFinished​(org.junit.runner.Description desc)
                          throws Exception
        Called when an atomic test has finished, whether the test succeeds or fails. This method must be invoked after a test has been started which was indicated by testStarted(Description) before. An ignored test is never finished.
        Overrides:
        testFinished in class org.junit.runner.notification.RunListener
        Parameters:
        desc - the description of the test that just ran
        Throws:
        Exception
        See Also:
        testIgnored(Description)
      • testFailure

        public void testFailure​(org.junit.runner.notification.Failure failure)
                         throws Exception
        Called when an atomic test fails to execute properly throwing a Throwable, or when a listener throws an exception.

        In the case of a failure of an atomic test, this method is invoked after testStarted(Description) and before testFinished(Description) with the according description of failure from the same thread that called testStarted(Description). In case of a failed assumption, instead of this method testAssumptionFailure(Failure) is invoked for the according test.

        In the case of a listener throwing an exception, this method will be called with the description of failure given by Description.TEST_MECHANISM, and may be called on an arbitrary thread.

        Overrides:
        testFailure in class org.junit.runner.notification.RunListener
        Parameters:
        failure - describes the test that failed and the exception that was thrown or indicates that a listener has thrown an exception and the according exception.
        Throws:
        Exception
      • testAssumptionFailure

        public void testAssumptionFailure​(org.junit.runner.notification.Failure failure)
        Called when an atomic test flags that it assumes a condition that is false. This is treated as ignored with the description of the failure. This method is invoked after testStarted(Description) and before testFinished(Description) with the according description of failure. A failed assertion does not count as a failure and so testFailure(Failure) is not invoked for the according test.

        CAUTION: Although a failed assertion is like an ignored test, testRunFinished(Result) does not count this as ignored test but rather than a passed test.

        Overrides:
        testAssumptionFailure in class org.junit.runner.notification.RunListener
        Parameters:
        failure - describes the test that failed and the AssumptionViolatedException that was thrown.
        See Also:
        testIgnored(Description)
      • testRunAborted

        public void testRunAborted()
        Invoked for stop and for break originated by the user.
        Overrides:
        testRunAborted in class ExtRunListener
      • testClassStructureLoaded

        public void testClassStructureLoaded​(org.junit.runner.Description desc)
        Invoked if a test class is loaded defining a testsuite described by desc.
        Overrides:
        testClassStructureLoaded in class ExtRunListener