Package org.apache.maven.surefire.junit
Class JUnit3Reporter
- java.lang.Object
-
- org.apache.maven.surefire.junit.JUnit3Reporter
-
- All Implemented Interfaces:
RunListener
,TestOutputReceiver<OutputReportEntry>
,RunModeSetter
final class JUnit3Reporter extends java.lang.Object implements RunListener, TestOutputReceiver<OutputReportEntry>, RunModeSetter
This implementation ofRunListener
handlesOutputReportEntry
in theoutput receiver
, downcasting toTestOutputReportEntry
, and delegates the report entry to theTestReportListener
. This object necessarily requires setting theRunMode
in order to behave properly.
-
-
Field Summary
Fields Modifier and Type Field Description private ClassMethodIndexer
classMethodIndexer
private TestReportListener<TestOutputReportEntry>
reporter
private RunMode
runMode
-
Constructor Summary
Constructors Constructor Description JUnit3Reporter(TestReportListener<TestOutputReportEntry> reporter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ClassMethodIndexer
getClassMethodIndexer()
void
setRunMode(RunMode runMode)
void
testAssumptionFailure(ReportEntry report)
Event fired when a test assumption failure was encountered.void
testError(ReportEntry report)
Event fired when a test ended with an error (non anticipated problem)void
testExecutionSkippedByUser()
Event fired skipping an execution of remaining test-set in other fork(s); or does nothing if no forks.void
testFailed(ReportEntry report)
Event fired when a test ended with a failure (anticipated problem)void
testSetCompleted(TestSetReportEntry report)
Indicates end of a given test-setvoid
testSetStarting(TestSetReportEntry report)
Indicates the start of a given test-setvoid
testSkipped(ReportEntry report)
Event fired when a test is skippedvoid
testStarting(ReportEntry report)
Event fired when a test is about to startvoid
testSucceeded(ReportEntry report)
Event fired when a test ended successfullyvoid
writeTestOutput(OutputReportEntry reportEntry)
Forwards process output from the running test-case into the reporting system
-
-
-
Field Detail
-
classMethodIndexer
private final ClassMethodIndexer classMethodIndexer
-
reporter
private final TestReportListener<TestOutputReportEntry> reporter
-
runMode
private volatile RunMode runMode
-
-
Constructor Detail
-
JUnit3Reporter
JUnit3Reporter(TestReportListener<TestOutputReportEntry> reporter)
-
-
Method Detail
-
getClassMethodIndexer
ClassMethodIndexer getClassMethodIndexer()
-
setRunMode
public void setRunMode(RunMode runMode)
- Specified by:
setRunMode
in interfaceRunModeSetter
-
testSetStarting
public void testSetStarting(TestSetReportEntry report)
Description copied from interface:RunListener
Indicates the start of a given test-set- Specified by:
testSetStarting
in interfaceRunListener
- Parameters:
report
- the report entry describing the testset
-
testSetCompleted
public void testSetCompleted(TestSetReportEntry report)
Description copied from interface:RunListener
Indicates end of a given test-set- Specified by:
testSetCompleted
in interfaceRunListener
- Parameters:
report
- the report entry describing the testset
-
testStarting
public void testStarting(ReportEntry report)
Description copied from interface:RunListener
Event fired when a test is about to start- Specified by:
testStarting
in interfaceRunListener
- Parameters:
report
- The report entry to log for
-
testSucceeded
public void testSucceeded(ReportEntry report)
Description copied from interface:RunListener
Event fired when a test ended successfully- Specified by:
testSucceeded
in interfaceRunListener
- Parameters:
report
- The report entry to log for
-
testAssumptionFailure
public void testAssumptionFailure(ReportEntry report)
Description copied from interface:RunListener
Event fired when a test assumption failure was encountered. An assumption failure indicates that the test is not relevant- Specified by:
testAssumptionFailure
in interfaceRunListener
- Parameters:
report
- The report entry to log for
-
testError
public void testError(ReportEntry report)
Description copied from interface:RunListener
Event fired when a test ended with an error (non anticipated problem)- Specified by:
testError
in interfaceRunListener
- Parameters:
report
- The report entry to log for
-
testFailed
public void testFailed(ReportEntry report)
Description copied from interface:RunListener
Event fired when a test ended with a failure (anticipated problem)- Specified by:
testFailed
in interfaceRunListener
- Parameters:
report
- The report entry to log for
-
testSkipped
public void testSkipped(ReportEntry report)
Description copied from interface:RunListener
Event fired when a test is skipped- Specified by:
testSkipped
in interfaceRunListener
- Parameters:
report
- The report entry to log for
-
testExecutionSkippedByUser
public void testExecutionSkippedByUser()
Description copied from interface:RunListener
Event fired skipping an execution of remaining test-set in other fork(s); or does nothing if no forks. The method is called bySurefireProvider
.(The event is fired after the Nth test failed to signal skipping the rest of test-set.)
- Specified by:
testExecutionSkippedByUser
in interfaceRunListener
-
writeTestOutput
public void writeTestOutput(OutputReportEntry reportEntry)
Description copied from interface:TestOutputReceiver
Forwards process output from the running test-case into the reporting system- Specified by:
writeTestOutput
in interfaceTestOutputReceiver<OutputReportEntry>
- Parameters:
reportEntry
- wraps test output with descriptive information of the output
-
-