Interface TestListener

All Superinterfaces:
EventListener

@Deprecated public interface TestListener extends EventListener
Deprecated.
To be replaced by JUnit 5 listener mechanism.
A listener which is notified when a test begin, complete or fail. Listeners can be registered by invoking TestSuite.addTestListener(TestListener).
Since:
3.1
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    failed(TestEvent event, Throwable exception)
    Deprecated.
    Invoked when a test fails.
    void
    Deprecated.
    Invoked when a test method finishes (whether passing or failing).
    void
    Deprecated.
    Invoked when a test is about to start.
    void
    Deprecated.
    Invoked when a test succeeds.
  • Method Details

    • starting

      void starting(TestEvent event)
      Deprecated.
      Invoked when a test is about to start.
      Parameters:
      event - a description of the test which is about to be run.
    • succeeded

      void succeeded(TestEvent event)
      Deprecated.
      Invoked when a test succeeds.
      Parameters:
      event - a description of the test which has been run.
    • failed

      void failed(TestEvent event, Throwable exception)
      Deprecated.
      Invoked when a test fails.
      Parameters:
      event - a description of the test which has been run.
      exception - the exception that occurred during the execution.
    • finished

      void finished(TestEvent event)
      Deprecated.
      Invoked when a test method finishes (whether passing or failing).
      Parameters:
      event - a description of the test which has been run.