public abstract class AbstractReporter extends java.lang.Object implements Reporter, ReportWriter
| Modifier and Type | Field and Description |
|---|---|
protected int |
completedCount |
protected int |
errors |
protected int |
failures |
protected static java.lang.String |
NL |
protected int |
skipped |
protected long |
testSetStartTime |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractReporter(java.lang.Boolean trimStackTrace) |
protected |
AbstractReporter(ReporterConfiguration reporterConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
deleteIfExisting(java.io.File reportFile) |
protected java.lang.String |
elapsedTimeAsString(long runTime) |
protected long |
getActualRunTime(ReportEntry reportEntry) |
int |
getNumErrors() |
int |
getNumFailures() |
int |
getNumSkipped() |
int |
getNumTests() |
protected java.lang.String |
getStackTrace(ReportEntry report)
Returns stacktrace as String.
|
protected boolean |
isTimedOut() |
void |
reset()
Restores the instance of the reporter, making the instance re-usable for a subsequent run in the
same thread.
|
void |
runCompleted() |
void |
runStarting() |
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 |
testError(ReportEntry report,
java.lang.String stdOut,
java.lang.String stdErr)
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 |
testFailed(ReportEntry report,
java.lang.String stdOut,
java.lang.String stdErr)
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 |
writeFooter(java.lang.String footer) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwriteDetailMessage, writeMessagewriteDetailMessage, writeMessageprotected int completedCount
protected int errors
protected int failures
protected static final java.lang.String NL
protected long testSetStartTime
protected int skipped
protected AbstractReporter(ReporterConfiguration reporterConfiguration)
protected AbstractReporter(java.lang.Boolean trimStackTrace)
protected boolean isTimedOut()
public void writeFooter(java.lang.String footer)
writeFooter in interface ReporterwriteFooter in interface ReportWriterpublic void runStarting()
public void runCompleted()
public void testSetStarting(ReportEntry report) throws ReporterException
ReportertestSetStarting in interface ReportertestSetStarting in interface ReportWriterreport - the report entry describing the testsetReporterException - When reporting failspublic void testSetCompleted(ReportEntry report) throws ReporterException
ReportertestSetCompleted in interface ReportertestSetCompleted in interface ReportWriterreport - the report entry describing the testsetReporterException - When reporting failspublic void testStarting(ReportEntry report)
ReportertestStarting in interface ReportertestStarting in interface ReportWriterreport - The report entry to log forpublic void testSucceeded(ReportEntry report)
ReportertestSucceeded in interface ReportertestSucceeded in interface ReportWriterreport - The report entry to log forpublic void testSkipped(ReportEntry report)
testSkipped in interface ReportertestSkipped in interface ReportWriterpublic void testError(ReportEntry report, java.lang.String stdOut, java.lang.String stdErr)
ReportertestError in interface ReportertestError in interface ReportWriterreport - The report entry to log forstdOut - standard output from the test casestdErr - error output from the test casepublic void testFailed(ReportEntry report, java.lang.String stdOut, java.lang.String stdErr)
ReportertestFailed in interface ReportertestFailed in interface ReportWriterreport - The report entry to log forstdOut - standard output from the test casestdErr - error output from the test casepublic int getNumErrors()
public int getNumSkipped()
public int getNumFailures()
public int getNumTests()
public void reset()
Reporterreset in interface Reporterreset in interface ReportWriterprotected java.lang.String elapsedTimeAsString(long runTime)
protected java.lang.String getStackTrace(ReportEntry report)
report - ReportEntry object.protected long getActualRunTime(ReportEntry reportEntry)
public void testError(ReportEntry report)
ReportertestError in interface ReportertestError in interface ReportWriterreport - The report entry to log forpublic void testFailed(ReportEntry report)
ReportertestFailed in interface ReportertestFailed in interface ReportWriterreport - The report entry to log forpublic void testAssumptionFailure(ReportEntry report)
ReportertestAssumptionFailure in interface Reporterreport - The report entry to log forprotected void deleteIfExisting(java.io.File reportFile)
Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.