Class JUnitTestListener

java.lang.Object
org.junit.runner.notification.RunListener
org.infinispan.commons.test.JUnitTestListener

public class JUnitTestListener extends org.junit.runner.notification.RunListener
Logs JUnit test progress.

To enable when running a test in the IDE, annotate the test class with @RunWith(JUnitTestListener.Runner.class).

To enable in Maven, set the listener property in the surefire/failsafe plugin.

Since:
9.0
Author:
Dan Berindei
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Use this runner to add the listener to your test

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

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    testAssumptionFailure(org.junit.runner.notification.Failure failure)
     
    void
    testFailure(org.junit.runner.notification.Failure failure)
     
    void
    testFinished(org.junit.runner.Description description)
     
    void
    testIgnored(org.junit.runner.Description description)
     
    void
    testRunFinished(org.junit.runner.Result result)
     
    void
    testRunStarted(org.junit.runner.Description description)
     
    void
    testStarted(org.junit.runner.Description description)
     

    Methods inherited from class org.junit.runner.notification.RunListener

    testSuiteFinished, testSuiteStarted

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JUnitTestListener

      public JUnitTestListener()
  • Method Details

    • testStarted

      public void testStarted(org.junit.runner.Description description) throws Exception
      Overrides:
      testStarted in class org.junit.runner.notification.RunListener
      Throws:
      Exception
    • testFinished

      public void testFinished(org.junit.runner.Description description) throws Exception
      Overrides:
      testFinished in class org.junit.runner.notification.RunListener
      Throws:
      Exception
    • testFailure

      public void testFailure(org.junit.runner.notification.Failure failure)
      Overrides:
      testFailure in class org.junit.runner.notification.RunListener
    • testIgnored

      public void testIgnored(org.junit.runner.Description description)
      Overrides:
      testIgnored in class org.junit.runner.notification.RunListener
    • testAssumptionFailure

      public void testAssumptionFailure(org.junit.runner.notification.Failure failure)
      Overrides:
      testAssumptionFailure in class org.junit.runner.notification.RunListener
    • testRunStarted

      public void testRunStarted(org.junit.runner.Description description)
      Overrides:
      testRunStarted in class org.junit.runner.notification.RunListener
    • testRunFinished

      public void testRunFinished(org.junit.runner.Result result)
      Overrides:
      testRunFinished in class org.junit.runner.notification.RunListener