public class TestSetRunListener extends java.lang.Object implements RunListener, ConsoleOutputReceiver, ConsoleLogger
| Modifier and Type | Field and Description |
|---|---|
private boolean |
briefOrPlainFormat |
private TestcycleConsoleOutputReceiver |
consoleOutputReceiver |
private ConsoleReporter |
consoleReporter |
private TestSetStats |
detailsForThis |
private FileReporter |
fileReporter |
private StatelessXmlReporter |
simpleXMLReporter |
private StatisticsReporter |
statisticsReporter |
private java.util.List<TestMethodStats> |
testMethodStats |
private Utf8RecodingDeferredFileOutputStream |
testStdErr |
private Utf8RecodingDeferredFileOutputStream |
testStdOut |
| Constructor and Description |
|---|
TestSetRunListener(ConsoleReporter consoleReporter,
FileReporter fileReporter,
StatelessXmlReporter simpleXMLReporter,
TestcycleConsoleOutputReceiver consoleOutputReceiver,
StatisticsReporter statisticsReporter,
boolean trimStackTrace,
boolean isPlainFormat,
boolean briefOrPlainFormat) |
| Modifier and Type | Method and Description |
|---|---|
private void |
addTestMethodStats() |
private void |
clearCapture() |
void |
close() |
void |
debug(java.lang.String message) |
void |
error(java.lang.String message) |
void |
error(java.lang.String message,
java.lang.Throwable t)
Simply delegates to
error( toString( t, message ) ). |
void |
error(java.lang.Throwable t)
Simply delegates to method
error(null, Throwable). |
java.util.List<TestMethodStats> |
getTestMethodStats() |
void |
info(java.lang.String message) |
private Utf8RecodingDeferredFileOutputStream |
initDeferred(java.lang.String channel) |
boolean |
isDebugEnabled() |
boolean |
isErrorEnabled() |
boolean |
isInfoEnabled() |
boolean |
isWarnEnabled() |
private static int |
lineBoundSymbolWidth(java.lang.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 |
testExecutionSkippedByUser()
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-set
|
void |
testSetStarting(TestSetReportEntry report)
Indicates the start of a given test-set
|
void |
testSkipped(ReportEntry reportEntry)
Event fired when a test is skipped
|
void |
testStarting(ReportEntry report)
Event fired when a test is about to start
|
void |
testSucceeded(ReportEntry reportEntry)
Event fired when a test ended successfully
|
private static java.lang.String |
trimTrailingNewLine(java.lang.String message) |
void |
warning(java.lang.String message) |
private WrappedReportEntry |
wrap(ReportEntry other,
ReportEntryType reportEntryType) |
private WrappedReportEntry |
wrapTestSet(TestSetReportEntry other) |
void |
writeTestOutput(byte[] buf,
int off,
int len,
boolean stdout)
Forwards process output from the running test-case into the reporting system
|
private final TestSetStats detailsForThis
private java.util.List<TestMethodStats> testMethodStats
private Utf8RecodingDeferredFileOutputStream testStdOut
private Utf8RecodingDeferredFileOutputStream testStdErr
private final TestcycleConsoleOutputReceiver consoleOutputReceiver
private final boolean briefOrPlainFormat
private final StatelessXmlReporter simpleXMLReporter
private final ConsoleReporter consoleReporter
private final FileReporter fileReporter
private final StatisticsReporter statisticsReporter
public TestSetRunListener(ConsoleReporter consoleReporter, FileReporter fileReporter, StatelessXmlReporter simpleXMLReporter, TestcycleConsoleOutputReceiver consoleOutputReceiver, StatisticsReporter statisticsReporter, boolean trimStackTrace, boolean isPlainFormat, boolean briefOrPlainFormat)
private Utf8RecodingDeferredFileOutputStream initDeferred(java.lang.String channel)
public boolean isDebugEnabled()
isDebugEnabled in interface ConsoleLoggerpublic void debug(java.lang.String message)
debug in interface ConsoleLoggerpublic boolean isInfoEnabled()
isInfoEnabled in interface ConsoleLoggerpublic void info(java.lang.String message)
info in interface ConsoleLoggerpublic boolean isWarnEnabled()
isWarnEnabled in interface ConsoleLoggerpublic void warning(java.lang.String message)
warning in interface ConsoleLoggerpublic boolean isErrorEnabled()
isErrorEnabled in interface ConsoleLoggerpublic void error(java.lang.String message)
error in interface ConsoleLoggermessage - message to logpublic void error(java.lang.String message,
java.lang.Throwable t)
ConsoleLoggererror( toString( t, message ) ).error in interface ConsoleLoggermessage - message to logt - exception, message and trace to logpublic void error(java.lang.Throwable t)
ConsoleLoggererror(null, Throwable).error in interface ConsoleLoggert - exception, message and trace to logpublic void writeTestOutput(byte[] buf,
int off,
int len,
boolean stdout)
ConsoleOutputReceiverwriteTestOutput in interface ConsoleOutputReceiverbuf - the buffer to writeoff - offsetlen - lenstdout - Indicates if this is stdoutpublic void testSetStarting(TestSetReportEntry report)
RunListenertestSetStarting in interface RunListenerreport - the report entry describing the testsetprivate void clearCapture()
public void testSetCompleted(TestSetReportEntry report)
RunListenertestSetCompleted in interface RunListenerreport - the report entry describing the testsetpublic void testStarting(ReportEntry report)
RunListenertestStarting in interface RunListenerreport - The report entry to log forpublic void testSucceeded(ReportEntry reportEntry)
RunListenertestSucceeded in interface RunListenerreportEntry - The report entry to log forpublic void testError(ReportEntry reportEntry)
RunListenertestError in interface RunListenerreportEntry - The report entry to log forpublic void testFailed(ReportEntry reportEntry)
RunListenertestFailed in interface RunListenerreportEntry - The report entry to log forpublic void testSkipped(ReportEntry reportEntry)
RunListenertestSkipped in interface RunListenerreportEntry - The report entry to log forpublic void testExecutionSkippedByUser()
RunListenerSurefireProvider.(The event is fired after the Nth test failed to signal skipping the rest of test-set.)
testExecutionSkippedByUser in interface RunListenerpublic void testAssumptionFailure(ReportEntry report)
RunListenertestAssumptionFailure in interface RunListenerreport - The report entry to log forprivate WrappedReportEntry wrap(ReportEntry other, ReportEntryType reportEntryType)
private WrappedReportEntry wrapTestSet(TestSetReportEntry other)
public void close()
private void addTestMethodStats()
public java.util.List<TestMethodStats> getTestMethodStats()
private static java.lang.String trimTrailingNewLine(java.lang.String message)
private static int lineBoundSymbolWidth(java.lang.String message)