org.apache.maven.surefire.junit4
Class JUnit4TestSetReporter

java.lang.Object
  extended by org.junit.runner.notification.RunListener
      extended by org.apache.maven.surefire.junit4.JUnit4TestSetReporter

public class JUnit4TestSetReporter
extends org.junit.runner.notification.RunListener


Field Summary
private static java.util.ResourceBundle bundle
           
private  boolean failureFlag
          This flag is set after a failure has occurred so that a testSucceeded event is not fired.
private  org.apache.maven.surefire.report.ReporterManager reportMgr
           
private  JUnit4TestSet testSet
           
 
Constructor Summary
JUnit4TestSetReporter(JUnit4TestSet testSet, org.apache.maven.surefire.report.ReporterManager reportManager)
          Constructor.
 
Method Summary
 void testFailure(org.junit.runner.notification.Failure failure)
          Called when a specific test has failed.
 void testFinished(org.junit.runner.Description description)
          Called after a specific test has finished.
 void testIgnored(org.junit.runner.Description description)
          Called when a specific test has been skipped (for whatever reason).
 void testRunFinished(org.junit.runner.Result result)
          Called right after all tests from a specific class are run.
 void testRunStarted(org.junit.runner.Description description)
          Called right before any tests from a specific class are run.
 void testStarted(org.junit.runner.Description description)
          Called when a specific test has started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bundle

private static java.util.ResourceBundle bundle

testSet

private JUnit4TestSet testSet

reportMgr

private org.apache.maven.surefire.report.ReporterManager reportMgr

failureFlag

private boolean failureFlag
This flag is set after a failure has occurred so that a testSucceeded event is not fired. This is necessary because JUnit4 always fires a testRunFinished event-- even if there was a failure.

Constructor Detail

JUnit4TestSetReporter

JUnit4TestSetReporter(JUnit4TestSet testSet,
                      org.apache.maven.surefire.report.ReporterManager reportManager)
Constructor.

Parameters:
testSet - the specific test set that this will report on as it is executed
reportManager - the report manager to log testing events to
Method Detail

testRunStarted

public void testRunStarted(org.junit.runner.Description description)
                    throws java.lang.Exception
Called right before any tests from a specific class are run.

Overrides:
testRunStarted in class org.junit.runner.notification.RunListener
Throws:
java.lang.Exception
See Also:
RunListener.testRunStarted(org.junit.runner.Description)

testRunFinished

public void testRunFinished(org.junit.runner.Result result)
                     throws java.lang.Exception
Called right after all tests from a specific class are run.

Overrides:
testRunFinished in class org.junit.runner.notification.RunListener
Throws:
java.lang.Exception
See Also:
RunListener.testRunFinished(org.junit.runner.Result)

testIgnored

public void testIgnored(org.junit.runner.Description description)
                 throws java.lang.Exception
Called when a specific test has been skipped (for whatever reason).

Overrides:
testIgnored in class org.junit.runner.notification.RunListener
Throws:
java.lang.Exception
See Also:
RunListener.testIgnored(org.junit.runner.Description)

testStarted

public void testStarted(org.junit.runner.Description description)
                 throws java.lang.Exception
Called when a specific test has started.

Overrides:
testStarted in class org.junit.runner.notification.RunListener
Throws:
java.lang.Exception
See Also:
RunListener.testStarted(org.junit.runner.Description)

testFailure

public void testFailure(org.junit.runner.notification.Failure failure)
                 throws java.lang.Exception
Called when a specific test has failed.

Overrides:
testFailure in class org.junit.runner.notification.RunListener
Throws:
java.lang.Exception
See Also:
RunListener.testFailure(org.junit.runner.notification.Failure)

testFinished

public void testFinished(org.junit.runner.Description description)
                  throws java.lang.Exception
Called after a specific test has finished.

Overrides:
testFinished in class org.junit.runner.notification.RunListener
Throws:
java.lang.Exception
See Also:
RunListener.testFinished(org.junit.runner.Description)