org.apache.maven.surefire.junitcore
Class JUnitCoreRunListener

java.lang.Object
  extended by org.junit.runner.notification.RunListener
      extended by org.apache.maven.surefire.common.junit4.JUnit4RunListener
          extended by org.apache.maven.surefire.junitcore.JUnitCoreRunListener

public class JUnitCoreRunListener
extends JUnit4RunListener

Noteworthy things about JUnit4 listening:

A class that is annotated with @Ignore will have one invocation of "testSkipped" with source==name A method that is annotated with @Ignore will have a invocation of testSkipped with source and name distinct Methods annotated with @Ignore trigger no further events.

See Also:
for details about parallel running

Field Summary
 
Fields inherited from class org.apache.maven.surefire.common.junit4.JUnit4RunListener
reporter
 
Constructor Summary
JUnitCoreRunListener(RunListener reporter, Map<String,TestSet> classMethodCounts)
           
 
Method Summary
protected  StackTraceWriter createStackTraceWriter(Failure failure)
           
 void testRunFinished(Result result)
           
 void testRunStarted(Description description)
          Called right before any tests from a specific class are run.
 
Methods inherited from class org.apache.maven.surefire.common.junit4.JUnit4RunListener
createReportEntry, extractClassName, extractMethodName, getClassName, rethrowAnyTestMechanismFailures, testAssumptionFailure, testFailure, testFinished, testIgnored, testStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JUnitCoreRunListener

public JUnitCoreRunListener(RunListener reporter,
                            Map<String,TestSet> classMethodCounts)
Parameters:
reporter - the report manager to log testing events to
classMethodCounts - A map of methods
Method Detail

testRunStarted

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

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

testRunFinished

public void testRunFinished(Result result)
                     throws Exception
Overrides:
testRunFinished in class RunListener
Throws:
Exception

createStackTraceWriter

protected StackTraceWriter createStackTraceWriter(Failure failure)
Overrides:
createStackTraceWriter in class JUnit4RunListener


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.