Class MutableTestExecutionSummary
java.lang.Object
org.junit.platform.launcher.listeners.MutableTestExecutionSummary
- All Implemented Interfaces:
TestExecutionSummary
Mutable, internal implementation of the
TestExecutionSummary API.- Since:
- 1.0
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface TestExecutionSummary
TestExecutionSummary.Failure -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final String(package private) final AtomicLong(package private) final AtomicLong(package private) final AtomicLong(package private) final AtomicLong(package private) final AtomicLong(package private) final AtomicLongprivate static final intprivate static final Stringprivate final List<TestExecutionSummary.Failure> private static final Stringprivate static final Stringprivate final TestPlan(package private) final AtomicLong(package private) final AtomicLong(package private) final AtomicLong(package private) final AtomicLong(package private) final AtomicLong(package private) final AtomicLong(package private) long(package private) longprivate final longprivate final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddFailure(TestIdentifier testIdentifier, Throwable throwable) private voidcollectTestDescription(TestIdentifier identifier, List<String> descriptionParts) private StringdescribeTest(TestIdentifier testIdentifier) longGet the number of containers aborted.longGet the number of containers that failed.longGet the number of containers found.longGet the number of containers skipped.longGet the number of containers started.longGet the number of containers that succeeded.Get an immutable list of the failures of the test plan execution.longGet the number of tests aborted.longGet the number of tests that failed.longGet the number of tests found.longGet the number of tests skipped.longGet the number of tests started.longGet the number of tests that succeeded.longGet the timestamp (in milliseconds) when the test plan finished.longGet the timestamp (in milliseconds) when the test plan started.longGet the total number of failed containers and failed tests.private intnumberOfCommonFrames(StackTraceElement[] currentTrace, StackTraceElement[] parentTrace) voidprintFailuresTo(PrintWriter writer) Print failed containers and tests, including sources and exception messages, to the suppliedPrintWriter.voidprintFailuresTo(PrintWriter writer, int maxStackTraceLines) Print failed containers and tests, including sources and exception messages, to the suppliedPrintWriter.private voidprintSource(PrintWriter writer, TestIdentifier testIdentifier) private voidprintStackTrace(PrintWriter writer, StackTraceElement[] parentTrace, Throwable throwable, String caption, String indentation, Set<Throwable> seenThrowables, int max) private voidprintStackTrace(PrintWriter writer, Throwable throwable, int max) voidprintTo(PrintWriter writer) Print this summary to the suppliedPrintWriter.
-
Field Details
-
TAB
- See Also:
-
DOUBLE_TAB
- See Also:
-
DEFAULT_MAX_STACKTRACE_LINES
private static final int DEFAULT_MAX_STACKTRACE_LINES- See Also:
-
CAUSED_BY
- See Also:
-
SUPPRESSED
- See Also:
-
CIRCULAR
- See Also:
-
containersFound
-
containersStarted
-
containersSkipped
-
containersAborted
-
containersSucceeded
-
containersFailed
-
testsFound
-
testsStarted
-
testsSkipped
-
testsAborted
-
testsSucceeded
-
testsFailed
-
testPlan
-
failures
-
timeStarted
private final long timeStarted -
timeStartedNanos
private final long timeStartedNanos -
timeFinished
long timeFinished -
timeFinishedNanos
long timeFinishedNanos
-
-
Constructor Details
-
MutableTestExecutionSummary
MutableTestExecutionSummary(TestPlan testPlan)
-
-
Method Details
-
addFailure
-
getTimeStarted
public long getTimeStarted()Description copied from interface:TestExecutionSummaryGet the timestamp (in milliseconds) when the test plan started.- Specified by:
getTimeStartedin interfaceTestExecutionSummary
-
getTimeFinished
public long getTimeFinished()Description copied from interface:TestExecutionSummaryGet the timestamp (in milliseconds) when the test plan finished.- Specified by:
getTimeFinishedin interfaceTestExecutionSummary
-
getTotalFailureCount
public long getTotalFailureCount()Description copied from interface:TestExecutionSummaryGet the total number of failed containers and failed tests.- Specified by:
getTotalFailureCountin interfaceTestExecutionSummary- See Also:
-
getContainersFoundCount
public long getContainersFoundCount()Description copied from interface:TestExecutionSummaryGet the number of containers found.- Specified by:
getContainersFoundCountin interfaceTestExecutionSummary
-
getContainersStartedCount
public long getContainersStartedCount()Description copied from interface:TestExecutionSummaryGet the number of containers started.- Specified by:
getContainersStartedCountin interfaceTestExecutionSummary
-
getContainersSkippedCount
public long getContainersSkippedCount()Description copied from interface:TestExecutionSummaryGet the number of containers skipped.- Specified by:
getContainersSkippedCountin interfaceTestExecutionSummary
-
getContainersAbortedCount
public long getContainersAbortedCount()Description copied from interface:TestExecutionSummaryGet the number of containers aborted.- Specified by:
getContainersAbortedCountin interfaceTestExecutionSummary
-
getContainersSucceededCount
public long getContainersSucceededCount()Description copied from interface:TestExecutionSummaryGet the number of containers that succeeded.- Specified by:
getContainersSucceededCountin interfaceTestExecutionSummary
-
getContainersFailedCount
public long getContainersFailedCount()Description copied from interface:TestExecutionSummaryGet the number of containers that failed.- Specified by:
getContainersFailedCountin interfaceTestExecutionSummary- See Also:
-
getTestsFoundCount
public long getTestsFoundCount()Description copied from interface:TestExecutionSummaryGet the number of tests found.- Specified by:
getTestsFoundCountin interfaceTestExecutionSummary
-
getTestsStartedCount
public long getTestsStartedCount()Description copied from interface:TestExecutionSummaryGet the number of tests started.- Specified by:
getTestsStartedCountin interfaceTestExecutionSummary
-
getTestsSkippedCount
public long getTestsSkippedCount()Description copied from interface:TestExecutionSummaryGet the number of tests skipped.- Specified by:
getTestsSkippedCountin interfaceTestExecutionSummary
-
getTestsAbortedCount
public long getTestsAbortedCount()Description copied from interface:TestExecutionSummaryGet the number of tests aborted.- Specified by:
getTestsAbortedCountin interfaceTestExecutionSummary
-
getTestsSucceededCount
public long getTestsSucceededCount()Description copied from interface:TestExecutionSummaryGet the number of tests that succeeded.- Specified by:
getTestsSucceededCountin interfaceTestExecutionSummary
-
getTestsFailedCount
public long getTestsFailedCount()Description copied from interface:TestExecutionSummaryGet the number of tests that failed.- Specified by:
getTestsFailedCountin interfaceTestExecutionSummary- See Also:
-
printTo
Description copied from interface:TestExecutionSummaryPrint this summary to the suppliedPrintWriter.This method does not print failure messages.
- Specified by:
printToin interfaceTestExecutionSummary- See Also:
-
printFailuresTo
Description copied from interface:TestExecutionSummaryPrint failed containers and tests, including sources and exception messages, to the suppliedPrintWriter.- Specified by:
printFailuresToin interfaceTestExecutionSummary- Parameters:
writer- thePrintWriterto which to print; nevernull- See Also:
-
printFailuresTo
Description copied from interface:TestExecutionSummaryPrint failed containers and tests, including sources and exception messages, to the suppliedPrintWriter.The maximum number of lines to print for exception stack traces (if any) can be specified via the
maxStackTraceLinesargument.By default, this method delegates to
TestExecutionSummary.printFailuresTo(PrintWriter), effectively ignoring themaxStackTraceLinesargument. Concrete implementations of this interface should therefore override this default method in order to honor themaxStackTraceLinesargument.- Specified by:
printFailuresToin interfaceTestExecutionSummary- Parameters:
writer- thePrintWriterto which to print; nevernullmaxStackTraceLines- the maximum number of lines to print for exception stack traces; must be a positive value- See Also:
-
getFailures
Description copied from interface:TestExecutionSummaryGet an immutable list of the failures of the test plan execution.- Specified by:
getFailuresin interfaceTestExecutionSummary
-
describeTest
-
collectTestDescription
-
printSource
-
printStackTrace
-
printStackTrace
private void printStackTrace(PrintWriter writer, StackTraceElement[] parentTrace, Throwable throwable, String caption, String indentation, Set<Throwable> seenThrowables, int max) -
numberOfCommonFrames
-