|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.surefire.report.TestSetRunListener
public class TestSetRunListener
Reports data for a single test set.
Synchronization/Threading note: This design is really only good for single-threaded test execution. With the use of the additional SynchronizedReporterManager you can get a buggy version that sort-of supports multithreading. The underlying providers are singletons and keep state per ReporterManager instance The solution to this problem involves making a clearer separation between test-result collection and reporting, preferably removing singleton state approach out of the reporting interface.
Constructor Summary | |
---|---|
TestSetRunListener(List reports,
RunStatistics globalStats)
|
Method Summary | |
---|---|
void |
clearCapturedContent()
|
String |
getAsString(List byteBufferList)
|
void |
reset()
Restores the instance of the reporter, making the instance re-usable for a subsequent run in the same thread. |
void |
runCompleted()
Indicates the end of the entire test run Only called on the first provider, and just by the ReporterFactory |
void |
runStarting()
Indicates the start of the entire test run. |
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 |
testError(ReportEntry reportEntry,
String stdOutLog,
String stdErrLog)
Event fired when a test ended with an error (non anticipated problem) |
void |
testFailed(ReportEntry reportEntry)
Event fired when a test ended with a failure (anticipated problem) |
void |
testFailed(ReportEntry reportEntry,
String stdOutLog,
String stdErrLog)
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)
|
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 |
writeDetailMessage(String message)
Writes a detailed message that will not necessarily be displayed in all channels. |
void |
writeFooter(String footer)
|
void |
writeMessage(String message)
Writes a message that will be displayed in all free-text format reporters. |
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 |
Constructor Detail |
---|
public TestSetRunListener(List reports, RunStatistics globalStats)
Method Detail |
---|
public void writeMessage(String message)
Reporter
writeMessage
in interface Reporter
message
- The message to write.public 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 void writeDetailMessage(String message)
Reporter
writeDetailMessage
in interface Reporter
message
- The message to writepublic void runStarting()
RunReporter
runStarting
in interface RunReporter
public void runCompleted()
RunReporter
runCompleted
in interface RunReporter
public void writeFooter(String footer)
writeFooter
in interface Reporter
public void testSetStarting(ReportEntry report) throws ReporterException
RunListener
testSetStarting
in interface Reporter
testSetStarting
in interface RunListener
report
- the report entry describing the testset
ReporterException
- When reporting failspublic void testSetCompleted(ReportEntry report)
RunListener
testSetCompleted
in interface Reporter
testSetCompleted
in interface RunListener
report
- the report entry describing the testsetpublic void testStarting(ReportEntry report)
RunListener
testStarting
in interface Reporter
testStarting
in interface RunListener
report
- The report entry to log forpublic void testSucceeded(ReportEntry report)
RunListener
testSucceeded
in interface Reporter
testSucceeded
in interface RunListener
report
- The report entry to log forpublic void testError(ReportEntry reportEntry)
RunListener
testError
in interface Reporter
testError
in interface RunListener
reportEntry
- The report entry to log forpublic void testError(ReportEntry reportEntry, String stdOutLog, String stdErrLog)
Reporter
testError
in interface Reporter
reportEntry
- The report entry to log forstdOutLog
- standard output from the test casestdErrLog
- error output from the test casepublic void testFailed(ReportEntry reportEntry)
RunListener
testFailed
in interface Reporter
testFailed
in interface RunListener
reportEntry
- The report entry to log forpublic void testFailed(ReportEntry reportEntry, String stdOutLog, String stdErrLog)
Reporter
testFailed
in interface Reporter
reportEntry
- The report entry to log forstdOutLog
- standard output from the test casestdErrLog
- error output from the test casepublic void testSkipped(ReportEntry report)
testSkipped
in interface Reporter
testSkipped
in interface RunListener
public void testAssumptionFailure(ReportEntry report)
RunListener
testAssumptionFailure
in interface RunListener
report
- The report entry to log forpublic void reset()
Reporter
reset
in interface Reporter
public String getAsString(List byteBufferList)
public void clearCapturedContent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |