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 ReportEntry
private long
private final AtomicReference<LogicalStream>
private final long
private static final InheritableThreadLocal<TestMethod>
private ReportEntry
private ReportEntry
private ReportEntry
private ReportEntry
private final TestSet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
private ReportEntry
createReportEntry
(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) void
replay
(RunListener reporter) private void
(package private) void
testAssumption
(ReportEntry failure) (package private) void
testError
(ReportEntry failure) (package private) void
testFailure
(ReportEntry failure) (package private) void
(package private) void
testIgnored
(ReportEntry description) void
writeTestOutput
(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:ConsoleOutputReceiver
Forwards process output from the running test-case into the reporting system- Specified by:
writeTestOutput
in interfaceConsoleOutputReceiver
- Parameters:
output
- stdout/sterr output from running testsnewLine
- print on new linestdout
- Indicates if this is stdout
-
getTestSet
TestSet getTestSet()
-