Class SeqRunListener

    • Method Detail

      • testRunStarted

        public void testRunStarted​(Description desc)
                            throws java.lang.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 RunListener
        Parameters:
        desc - describes the suite of tests to be run.
        Throws:
        java.lang.Exception
      • testRunFinished

        public void testRunFinished​(Result result)
                             throws java.lang.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 RunListener
        Parameters:
        result - the summary of the outcoming of the suite of tests run, including all the tests that failed
        Throws:
        java.lang.Exception
      • testSuiteFinished

        public void testSuiteFinished​(Description desc)
                               throws java.lang.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:
        java.lang.Exception
        Since:
        4.13
      • testStarted

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

        public void testFinished​(Description desc)
                          throws java.lang.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 RunListener
        Parameters:
        desc - the description of the test that just ran
        Throws:
        java.lang.Exception
        See Also:
        testIgnored(Description)
      • testFailure

        public void testFailure​(Failure failure)
                         throws java.lang.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 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:
        java.lang.Exception
      • testRunAborted

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