Class TestMethod
java.lang.Object
org.apache.maven.surefire.junitcore.TestMethod
- All Implemented Interfaces:
ConsoleOutputReceiver
Represents the test-state of a single test method that is run.
Notes about thread safety: This instance is serially confined to 1-3 threads (construction, test-run, reporting), without any actual parallel access
Notes about thread safety: This instance is serially confined to 1-3 threads (construction, test-run, reporting), without any actual parallel access
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ReportEntryprivate longprivate final AtomicReference<LogicalStream>private final longprivate static final InheritableThreadLocal<TestMethod>private ReportEntryprivate ReportEntryprivate ReportEntryprivate ReportEntryprivate final TestSet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidprivate ReportEntrycreateReportEntry(ReportEntry reportEntry) (package private) void(package private) int(package private) long(package private) LogicalStream(package private) long(package private) TestSet(package private) static TestMethod(package private) voidreplay(RunListener reporter) private void(package private) voidtestAssumption(ReportEntry failure) (package private) voidtestError(ReportEntry failure) (package private) voidtestFailure(ReportEntry failure) (package private) void(package private) voidtestIgnored(ReportEntry description) voidwriteTestOutput(String output, boolean newLine, boolean stdout) Forwards process output from the running test-case into the reporting system
-
Field Details
-
TEST_METHOD
-
output
-
description
-
testSet
-
startTime
private final long startTime -
endTime
private volatile long endTime -
testFailure
-
testError
-
testIgnored
-
testAssumption
-
-
Constructor Details
-
TestMethod
TestMethod(ReportEntry description, TestSet testSet)
-
-
Method Details
-
testFinished
void testFinished() -
testIgnored
-
testFailure
-
testError
-
testAssumption
-
setEndTime
private void setEndTime() -
getElapsed
int getElapsed() -
getStartTime
long getStartTime() -
getEndTime
long getEndTime() -
replay
-
createReportEntry
-
attachToThread
void attachToThread() -
detachFromCurrentThread
void detachFromCurrentThread() -
getThreadTestMethod
-
getLogicalStream
LogicalStream getLogicalStream() -
writeTestOutput
Description copied from interface:ConsoleOutputReceiverForwards process output from the running test-case into the reporting system- Specified by:
writeTestOutputin interfaceConsoleOutputReceiver- Parameters:
output- stdout/sterr output from running testsnewLine- print on new linestdout- Indicates if this is stdout
-
getTestSet
TestSet getTestSet()
-