Class JUnitCoreRunListener
java.lang.Object
org.junit.runner.notification.RunListener
org.apache.maven.surefire.common.junit4.JUnit4RunListener
org.apache.maven.surefire.junitcore.JUnitCoreRunListener
- All Implemented Interfaces:
TestOutputReceiver<OutputReportEntry>,RunModeSetter
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.
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.junit.runner.notification.RunListener
org.junit.runner.notification.RunListener.ThreadSafe -
Field Summary
FieldsFields inherited from class org.apache.maven.surefire.common.junit4.JUnit4RunListener
classMethodIndexer, reporter -
Constructor Summary
ConstructorsConstructorDescriptionJUnitCoreRunListener(ConcurrentRunListener reporter, Map<String, TestSet> classMethodCounts) -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanasTestLeaf(org.junit.runner.Description description) protected StackTraceWritercreateStackTraceWriter(org.junit.runner.notification.Failure failure) private voidfillTestCountMap(org.junit.runner.Description testDesc) voidtestRunFinished(org.junit.runner.Result result) voidtestRunStarted(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, getConsoleLogger, getRunMode, rethrowAnyTestMechanismFailures, setRunMode, testAssumptionFailure, testExecutionSkippedByUser, testFailure, testFinished, testIgnored, testStarted, writeTestOutputMethods inherited from class org.junit.runner.notification.RunListener
testSuiteFinished, testSuiteStarted
-
Field Details
-
classMethodCounts
-
-
Constructor Details
-
JUnitCoreRunListener
JUnitCoreRunListener(ConcurrentRunListener reporter, Map<String, TestSet> classMethodCounts) - Parameters:
reporter- the report manager to log testing events toclassMethodCounts- A map of methods
-
-
Method Details
-
testRunStarted
Called right before any tests from a specific class are run.- Overrides:
testRunStartedin classorg.junit.runner.notification.RunListener- Throws:
Exception- See Also:
-
testRunFinished
- Overrides:
testRunFinishedin classorg.junit.runner.notification.RunListener- Throws:
Exception
-
fillTestCountMap
private void fillTestCountMap(org.junit.runner.Description testDesc) -
asTestLeaf
private boolean asTestLeaf(org.junit.runner.Description description) -
createStackTraceWriter
- Overrides:
createStackTraceWriterin classJUnit4RunListener
-