|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.surefire.booter.ForkingRunListener
public class ForkingRunListener
Encodes the full output of the test run to the stdout stream.
This class and the ForkClient contain the full definition of the "wire-level" protocol used by the forked process. The protocol is *not* part of any public api and may change without further notice. This class is threadsafe. The synchronization in the underlying PrintStream (target instance) is used to preserve thread safety of the output stream. To perform multiple writes/prints for a single request, they must synchronize on "target" variable in this class.
Field Summary | |
---|---|
static byte |
BOOTERCODE_BYE
|
static byte |
BOOTERCODE_CONSOLE
|
static byte |
BOOTERCODE_ERROR
|
static byte |
BOOTERCODE_NEXT_TEST
|
static byte |
BOOTERCODE_STDERR
|
static byte |
BOOTERCODE_STDOUT
|
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
|
Constructor Summary | |
---|---|
ForkingRunListener(PrintStream target,
int testSetChannelId,
boolean trimStackTraces)
|
Method Summary | |
---|---|
static byte[] |
createHeader(byte booterCode,
int testSetChannel)
|
static void |
encode(StringBuffer stringBuffer,
StackTraceWriter stackTraceWriter,
boolean trimStackTraces)
|
void |
info(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 |
testFailed(ReportEntry report)
Event fired when a test ended with a failure (anticipated problem) |
void |
testSetCompleted(ReportEntry report)
Indicates end of a given test-set |
void |
testSetStarting(ReportEntry 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 |
writeTestOutput(byte[] buf,
int off,
int len,
boolean stdout)
Forwards process output from the running test-case into the reporting system |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
public static final byte BOOTERCODE_SYSPROPS
public static final byte BOOTERCODE_NEXT_TEST
public static final byte BOOTERCODE_ERROR
public static final byte BOOTERCODE_BYE
Constructor Detail |
---|
public ForkingRunListener(PrintStream target, int testSetChannelId, boolean trimStackTraces)
Method Detail |
---|
public void testSetStarting(ReportEntry report)
RunListener
testSetStarting
in interface RunListener
report
- the report entry describing the testsetpublic void testSetCompleted(ReportEntry report)
RunListener
testSetCompleted
in interface RunListener
report
- the report entry describing the testsetpublic void testStarting(ReportEntry report)
RunListener
testStarting
in interface RunListener
report
- The report entry to log forpublic void testSucceeded(ReportEntry report)
RunListener
testSucceeded
in interface RunListener
report
- The report entry to log forpublic void testAssumptionFailure(ReportEntry report)
RunListener
testAssumptionFailure
in interface RunListener
report
- The report entry to log forpublic void testError(ReportEntry report)
RunListener
testError
in interface RunListener
report
- The report entry to log forpublic void testFailed(ReportEntry report)
RunListener
testFailed
in interface RunListener
report
- The report entry to log forpublic void testSkipped(ReportEntry report)
RunListener
testSkipped
in interface RunListener
report
- The report entry to log forpublic void writeTestOutput(byte[] buf, int off, int len, boolean stdout)
ConsoleOutputReceiver
writeTestOutput
in interface ConsoleOutputReceiver
buf
- the buffer to writeoff
- offsetlen
- lenstdout
- Indicates if this is stdoutpublic static byte[] createHeader(byte booterCode, int testSetChannel)
public void info(String message)
info
in interface ConsoleLogger
public static void encode(StringBuffer stringBuffer, StackTraceWriter stackTraceWriter, boolean trimStackTraces)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |