Class RunNotifier

    • Method Detail

      • fireTestSuiteStarted

        public void fireTestSuiteStarted​(Description description)
        Invoke to tell listeners that a test suite is about to start. Runners are strongly encouraged--but not required--to call this method. If this method is called for a given Description then fireTestSuiteFinished(Description) MUST be called for the same Description.
        Parameters:
        description - the description of the suite test (generally a class name)
        Since:
        4.13
      • fireTestSuiteFinished

        public void fireTestSuiteFinished​(Description description)
        Invoke to tell listeners that a test suite is about to finish. Always invoke this method if you invoke fireTestSuiteStarted(Description) as listeners are likely to expect them to come in pairs.
        Parameters:
        description - the description of the suite test (generally a class name)
        Since:
        4.13
      • fireTestStarted

        public void fireTestStarted​(Description description)
                             throws StoppedByUserException
        Invoke to tell listeners that an atomic test is about to start.
        Parameters:
        description - the description of the atomic test (generally a class and method name)
        Throws:
        StoppedByUserException - thrown if a user has requested that the test run stop
      • fireTestFailure

        public void fireTestFailure​(Failure failure)
        Invoke to tell listeners that an atomic test failed.
        Parameters:
        failure - the description of the test that failed and the exception thrown
      • fireTestIgnored

        public void fireTestIgnored​(Description description)
        Invoke to tell listeners that an atomic test was ignored.
        Parameters:
        description - the description of the ignored test
      • fireTestFinished

        public void fireTestFinished​(Description description)
        Invoke to tell listeners that an atomic test finished. Always invoke this method if you invoke fireTestStarted(Description) as listeners are likely to expect them to come in pairs.
        Parameters:
        description - the description of the test that finished
      • pleaseStop

        public void pleaseStop()
        Ask that the tests run stop before starting the next test. Phrased politely because the test currently running will not be interrupted. It seems a little odd to put this functionality here, but the RunNotifier is the only object guaranteed to be shared amongst the many runners involved.