public class ForkingRunListener extends Object implements RunListener, ConsoleLogger, ConsoleOutputReceiver, ConsoleStream
| Modifier and Type | Field and Description |
|---|---|
static byte |
BOOTERCODE_BYE |
static byte |
BOOTERCODE_CONSOLE
INFO logger
|
static byte |
BOOTERCODE_DEBUG
DEBUG logger
|
static byte |
BOOTERCODE_ERROR
ERROR logger
|
static byte |
BOOTERCODE_NEXT_TEST |
static byte |
BOOTERCODE_STDERR |
static byte |
BOOTERCODE_STDOUT |
static byte |
BOOTERCODE_STOP_ON_NEXT_TEST |
static byte |
BOOTERCODE_SYSPROPS |
static byte |
BOOTERCODE_TEST_ASSUMPTIONFAILURE |
static byte |
BOOTERCODE_TEST_ERROR |
static byte |
BOOTERCODE_TEST_FAILED |
static byte |
BOOTERCODE_TEST_SKIPPED |
static byte |
BOOTERCODE_TEST_STARTING |
static byte |
BOOTERCODE_TEST_SUCCEEDED |
static byte |
BOOTERCODE_TESTSET_COMPLETED |
static byte |
BOOTERCODE_TESTSET_STARTING |
static byte |
BOOTERCODE_WARNING
WARNING logger
|
| Constructor and Description |
|---|
ForkingRunListener(PrintStream target,
int testSetChannelId,
boolean trimStackTraces) |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
createHeader(byte booterCode,
int testSetChannel) |
void |
debug(String message) |
static void |
encode(StringBuilder stringBuilder,
StackTraceWriter stackTraceWriter,
boolean trimStackTraces) |
void |
error(String message) |
void |
error(String message,
Throwable t) |
void |
error(Throwable t) |
void |
info(String message) |
boolean |
isDebugEnabled() |
boolean |
isErrorEnabled() |
boolean |
isInfoEnabled() |
boolean |
isWarnEnabled() |
void |
println(byte[] buf,
int off,
int len) |
void |
println(String message) |
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-set
|
void |
testSetStarting(TestSetReportEntry report)
Indicates the start of a given test-set
|
void |
testSkipped(ReportEntry report)
Event fired when a test is skipped
|
void |
testStarting(ReportEntry report)
Event fired when a test is about to start
|
void |
testSucceeded(ReportEntry report)
Event fired when a test ended successfully
|
void |
warning(String message) |
void |
writeTestOutput(byte[] buf,
int off,
int len,
boolean stdout)
Forwards process output from the running test-case into the reporting system
|
public static final byte BOOTERCODE_TESTSET_STARTING
public static final byte BOOTERCODE_TESTSET_COMPLETED
public static final byte BOOTERCODE_STDOUT
public static final byte BOOTERCODE_STDERR
public static final byte BOOTERCODE_TEST_STARTING
public static final byte BOOTERCODE_TEST_SUCCEEDED
public static final byte BOOTERCODE_TEST_ERROR
public static final byte BOOTERCODE_TEST_FAILED
public static final byte BOOTERCODE_TEST_SKIPPED
public static final byte BOOTERCODE_TEST_ASSUMPTIONFAILURE
public static final byte BOOTERCODE_CONSOLE
ConsoleLogger.info(String),
Constant Field Valuespublic static final byte BOOTERCODE_SYSPROPS
public static final byte BOOTERCODE_NEXT_TEST
public static final byte BOOTERCODE_STOP_ON_NEXT_TEST
public static final byte BOOTERCODE_ERROR
ConsoleLogger.error(String),
Constant Field Valuespublic static final byte BOOTERCODE_BYE
public static final byte BOOTERCODE_DEBUG
ConsoleLogger.debug(String),
Constant Field Valuespublic static final byte BOOTERCODE_WARNING
public ForkingRunListener(PrintStream target, int testSetChannelId, boolean trimStackTraces)
public void testSetStarting(TestSetReportEntry report)
RunListenertestSetStarting in interface RunListenerreport - the report entry describing the testsetpublic 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 report)
RunListenertestSucceeded in interface RunListenerreport - The report entry to log forpublic void testAssumptionFailure(ReportEntry report)
RunListenertestAssumptionFailure in interface RunListenerreport - The report entry to log forpublic void testError(ReportEntry report)
RunListenertestError in interface RunListenerreport - The report entry to log forpublic void testFailed(ReportEntry report)
RunListenertestFailed in interface RunListenerreport - The report entry to log forpublic void testSkipped(ReportEntry report)
RunListenertestSkipped in interface RunListenerreport - 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 writeTestOutput(byte[] buf,
int off,
int len,
boolean stdout)
ConsoleOutputReceiverwriteTestOutput in interface ConsoleOutputReceiverbuf - the buffer to writeoff - offsetlen - lenstdout - Indicates if this is stdoutpublic static byte[] createHeader(byte booterCode,
int testSetChannel)
public boolean isDebugEnabled()
isDebugEnabled in interface ConsoleLoggerpublic void debug(String message)
debug in interface ConsoleLoggerpublic boolean isInfoEnabled()
isInfoEnabled in interface ConsoleLoggerpublic void info(String message)
info in interface ConsoleLoggerpublic boolean isWarnEnabled()
isWarnEnabled in interface ConsoleLoggerpublic void warning(String message)
warning in interface ConsoleLoggerpublic boolean isErrorEnabled()
isErrorEnabled in interface ConsoleLoggerpublic void error(String message)
error in interface ConsoleLoggerpublic void error(String message, Throwable t)
error in interface ConsoleLoggerpublic void error(Throwable t)
error in interface ConsoleLoggerpublic static void encode(StringBuilder stringBuilder, StackTraceWriter stackTraceWriter, boolean trimStackTraces)
public void println(String message)
println in interface ConsoleStreampublic void println(byte[] buf,
int off,
int len)
println in interface ConsoleStreamCopyright © 2004–2018 The Apache Software Foundation. All rights reserved.