Class TestSetRunListener
java.lang.Object
org.apache.maven.plugin.surefire.report.TestSetRunListener
- All Implemented Interfaces:
ConsoleLogger
,RunListener
,TestOutputReceiver<TestOutputReportEntry>
,TestReportListener<TestOutputReportEntry>
Reports data for a single test set.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
private final TestSetStats
private final Object
private final StatelessReportEventListener<WrappedReportEntry,
TestSetStats> private final StatisticsReporter
private final Queue<TestMethodStats>
private final ConsoleOutputReportEventListener
-
Constructor Summary
ConstructorsConstructorDescriptionTestSetRunListener
(StatelessTestsetInfoConsoleReportEventListener<WrappedReportEntry, TestSetStats> consoleReporter, StatelessTestsetInfoFileReportEventListener<WrappedReportEntry, TestSetStats> fileReporter, StatelessReportEventListener<WrappedReportEntry, TestSetStats> simpleXMLReporter, ConsoleOutputReportEventListener testOutputReceiver, StatisticsReporter statisticsReporter, boolean trimStackTrace, boolean isPlainFormat, boolean briefOrPlainFormat, Object lock) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private void
void
close()
void
void
void
Simply delegates toerror( toString( t, message ) )
.void
Simply delegates to methoderror(null, Throwable)
.void
private static Utf8RecodingDeferredFileOutputStream
initDeferred
(String channel) boolean
boolean
boolean
boolean
private static int
lineBoundSymbolWidth
(String message) void
testAssumptionFailure
(ReportEntry report) Event fired when a test assumption failure was encountered.void
testError
(ReportEntry reportEntry) 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 reportEntry) 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 reportEntry) Event fired when a test is skippedvoid
testStarting
(ReportEntry report) Event fired when a test is about to startvoid
testSucceeded
(ReportEntry reportEntry) Event fired when a test ended successfullyprivate static String
trimTrailingNewLine
(String message) void
private WrappedReportEntry
wrap
(ReportEntry other, ReportEntryType reportEntryType) private WrappedReportEntry
wrapTestSet
(TestSetReportEntry other) void
writeTestOutput
(TestOutputReportEntry reportEntry) Forwards process output from the running test-case into the reporting system
-
Field Details
-
testMethodStats
-
detailsForThis
-
testOutputReceiver
-
briefOrPlainFormat
private final boolean briefOrPlainFormat -
simpleXMLReporter
-
consoleReporter
private final StatelessTestsetInfoConsoleReportEventListener<WrappedReportEntry,TestSetStats> consoleReporter -
fileReporter
private final StatelessTestsetInfoFileReportEventListener<WrappedReportEntry,TestSetStats> fileReporter -
statisticsReporter
-
lock
-
testStdOut
-
testStdErr
-
-
Constructor Details
-
TestSetRunListener
public TestSetRunListener(StatelessTestsetInfoConsoleReportEventListener<WrappedReportEntry, TestSetStats> consoleReporter, StatelessTestsetInfoFileReportEventListener<WrappedReportEntry, TestSetStats> fileReporter, StatelessReportEventListener<WrappedReportEntry, TestSetStats> simpleXMLReporter, ConsoleOutputReportEventListener testOutputReceiver, StatisticsReporter statisticsReporter, boolean trimStackTrace, boolean isPlainFormat, boolean briefOrPlainFormat, Object lock)
-
-
Method Details
-
isDebugEnabled
public boolean isDebugEnabled()- Specified by:
isDebugEnabled
in interfaceConsoleLogger
-
debug
- Specified by:
debug
in interfaceConsoleLogger
-
isInfoEnabled
public boolean isInfoEnabled()- Specified by:
isInfoEnabled
in interfaceConsoleLogger
-
info
- Specified by:
info
in interfaceConsoleLogger
-
isWarnEnabled
public boolean isWarnEnabled()- Specified by:
isWarnEnabled
in interfaceConsoleLogger
-
warning
- Specified by:
warning
in interfaceConsoleLogger
-
isErrorEnabled
public boolean isErrorEnabled()- Specified by:
isErrorEnabled
in interfaceConsoleLogger
-
error
- Specified by:
error
in interfaceConsoleLogger
- Parameters:
message
- message to log
-
error
Description copied from interface:ConsoleLogger
Simply delegates toerror( toString( t, message ) )
.- Specified by:
error
in interfaceConsoleLogger
- Parameters:
message
- message to logt
- exception, message and trace to log
-
error
Description copied from interface:ConsoleLogger
Simply delegates to methoderror(null, Throwable)
.- Specified by:
error
in interfaceConsoleLogger
- Parameters:
t
- exception, message and trace to log
-
writeTestOutput
Description copied from interface:TestOutputReceiver
Forwards process output from the running test-case into the reporting system- Specified by:
writeTestOutput
in interfaceTestOutputReceiver<TestOutputReportEntry>
- Parameters:
reportEntry
- wraps test output with descriptive information of the output
-
testSetStarting
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
-
clearCapture
private void clearCapture() -
testSetCompleted
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
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
Description copied from interface:RunListener
Event fired when a test ended successfully- Specified by:
testSucceeded
in interfaceRunListener
- Parameters:
reportEntry
- The report entry to log for
-
testError
Description copied from interface:RunListener
Event fired when a test ended with an error (non anticipated problem)- Specified by:
testError
in interfaceRunListener
- Parameters:
reportEntry
- The report entry to log for
-
testFailed
Description copied from interface:RunListener
Event fired when a test ended with a failure (anticipated problem)- Specified by:
testFailed
in interfaceRunListener
- Parameters:
reportEntry
- The report entry to log for
-
testSkipped
Description copied from interface:RunListener
Event fired when a test is skipped- Specified by:
testSkipped
in interfaceRunListener
- Parameters:
reportEntry
- 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
-
testAssumptionFailure
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
-
wrap
-
wrapTestSet
-
close
public void close() -
addTestMethodStats
private void addTestMethodStats() -
getTestMethodStats
-
trimTrailingNewLine
-
lineBoundSymbolWidth
-
initDeferred
-