Class JUnitCoreRunListener
- java.lang.Object
-
- org.junit.runner.notification.RunListener
-
- org.apache.maven.surefire.common.junit4.JUnit4RunListener
-
- 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 Modifier and Type Field Description private java.util.Map<java.lang.String,TestSet>
classMethodCounts
-
Fields inherited from class org.apache.maven.surefire.common.junit4.JUnit4RunListener
reporter
-
-
Constructor Summary
Constructors Constructor Description JUnitCoreRunListener(RunListener reporter, java.util.Map<java.lang.String,TestSet> classMethodCounts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
asTestLeaf(org.junit.runner.Description description)
protected StackTraceWriter
createStackTraceWriter(org.junit.runner.notification.Failure failure)
private void
fillTestCountMap(org.junit.runner.Description testDesc)
void
testRunFinished(org.junit.runner.Result result)
void
testRunStarted(org.junit.runner.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, rethrowAnyTestMechanismFailures, testAssumptionFailure, testExecutionSkippedByUser, testFailure, testFinished, testIgnored, testStarted
-
-
-
-
Field Detail
-
classMethodCounts
private final java.util.Map<java.lang.String,TestSet> classMethodCounts
-
-
Constructor Detail
-
JUnitCoreRunListener
public JUnitCoreRunListener(RunListener reporter, java.util.Map<java.lang.String,TestSet> classMethodCounts)
- Parameters:
reporter
- the report manager to log testing events toclassMethodCounts
- A map of methods
-
-
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 classorg.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
- Overrides:
testRunFinished
in classorg.junit.runner.notification.RunListener
- Throws:
java.lang.Exception
-
fillTestCountMap
private void fillTestCountMap(org.junit.runner.Description testDesc)
-
asTestLeaf
private boolean asTestLeaf(org.junit.runner.Description description)
-
createStackTraceWriter
protected StackTraceWriter createStackTraceWriter(org.junit.runner.notification.Failure failure)
- Overrides:
createStackTraceWriter
in classJUnit4RunListener
-
-