Package org.apache.maven.surefire.report
Interface RunListener
- All Known Implementing Classes:
ClassesParallelRunListener
,ConcurrentRunListener
,ForkingRunListener
,MethodsParallelRunListener
,MockReporter
,TestSetRunListener
public interface RunListener
Used by providers to report results.
Using this interface integrates the providers together into a common reporting infrastructure.
An instance of a reporter is not guaranteed to be thread-safe and concurrent test frameworks must request an instance of a reporter per-thread from the ReporterFactory.
An instance of a reporter is not guaranteed to be thread-safe and concurrent test frameworks must request an instance of a reporter per-thread from the ReporterFactory.
-
Method Summary
Modifier and TypeMethodDescriptionMarks the listener with run mode, e.g.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
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 successfully
-
Method Details
-
testSetStarting
Indicates the start of a given test-set- Parameters:
report
- the report entry describing the testset- Throws:
ReporterException
- When reporting fails
-
testSetCompleted
Indicates end of a given test-set- Parameters:
report
- the report entry describing the testset- Throws:
ReporterException
- When reporting fails
-
testStarting
Event fired when a test is about to start- Parameters:
report
- The report entry to log for
-
testSucceeded
Event fired when a test ended successfully- Parameters:
report
- The report entry to log for
-
testAssumptionFailure
Event fired when a test assumption failure was encountered. An assumption failure indicates that the test is not relevant- Parameters:
report
- The report entry to log for
-
testError
Event fired when a test ended with an error (non anticipated problem)- Parameters:
report
- The report entry to log for
-
testFailed
Event fired when a test ended with a failure (anticipated problem)- Parameters:
report
- The report entry to log for
-
testSkipped
Event fired when a test is skipped- Parameters:
report
- The report entry to log for
-
testExecutionSkippedByUser
void testExecutionSkippedByUser()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.)
-
markAs
Marks the listener with run mode, e.g. normal run or re-run.- Parameters:
currentRunMode
- set current run- Returns:
- previous run mode; never returns null
- Throws:
NullPointerException
- ifcurrentRunMode
is null
-