Class TestFeedPrintingListener
- All Implemented Interfaces:
DetailsPrintingListener
,TestExecutionListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ColorPalette
private static final String
private final PrintWriter
private static final String
private TestPlan
Fields inherited from interface org.junit.platform.console.tasks.DetailsPrintingListener
LINE_START_PATTERN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncollectDisplayNames
(UniqueId uniqueId) void
executionFinished
(TestIdentifier testIdentifier, TestExecutionResult testExecutionResult) Called when the execution of a leaf or subtree of theTestPlan
has finished, regardless of the outcome.void
executionSkipped
(TestIdentifier testIdentifier, String reason) Called when the execution of a leaf or subtree of theTestPlan
has been skipped.void
executionStarted
(TestIdentifier testIdentifier) Called when the execution of a leaf or subtree of theTestPlan
is about to be started.private String
formatTestIdentifier
(TestIdentifier testIdentifier) private static String
void
private void
private static boolean
shouldPrint
(TestIdentifier testIdentifier) void
testPlanExecutionFinished
(TestPlan testPlan) Called when the execution of theTestPlan
has finished, after all tests have been executed.void
testPlanExecutionStarted
(TestPlan testPlan) Called when the execution of theTestPlan
has started, before any test has been executed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.junit.platform.launcher.TestExecutionListener
dynamicTestRegistered, reportingEntryPublished
-
Field Details
-
INDENTATION
- See Also:
-
STATUS_SEPARATOR
- See Also:
-
out
-
colorPalette
-
testPlan
-
-
Constructor Details
-
TestFeedPrintingListener
TestFeedPrintingListener(PrintWriter out, ColorPalette colorPalette)
-
-
Method Details
-
testPlanExecutionStarted
Description copied from interface:TestExecutionListener
Called when the execution of theTestPlan
has started, before any test has been executed.Called from the same thread as
TestExecutionListener.testPlanExecutionFinished(TestPlan)
.- Specified by:
testPlanExecutionStarted
in interfaceTestExecutionListener
- Parameters:
testPlan
- describes the tree of tests about to be executed
-
testPlanExecutionFinished
Description copied from interface:TestExecutionListener
Called when the execution of theTestPlan
has finished, after all tests have been executed.Called from the same thread as
TestExecutionListener.testPlanExecutionStarted(TestPlan)
.- Specified by:
testPlanExecutionFinished
in interfaceTestExecutionListener
- Parameters:
testPlan
- describes the tree of tests that have been executed
-
executionSkipped
Description copied from interface:TestExecutionListener
Called when the execution of a leaf or subtree of theTestPlan
has been skipped.The
TestIdentifier
may represent a test or a container. In the case of a container, no listener methods will be called for any of its descendants.A skipped test or subtree of tests will never be reported as started or finished.
- Specified by:
executionSkipped
in interfaceTestExecutionListener
- Parameters:
testIdentifier
- the identifier of the skipped test or containerreason
- a human-readable message describing why the execution has been skipped
-
executionStarted
Description copied from interface:TestExecutionListener
Called when the execution of a leaf or subtree of theTestPlan
is about to be started.The
TestIdentifier
may represent a test or a container.This method will only be called if the test or container has not been skipped.
This method will be called for a container
TestIdentifier
before starting or skipping any of its children.- Specified by:
executionStarted
in interfaceTestExecutionListener
- Parameters:
testIdentifier
- the identifier of the started test or container
-
executionFinished
public void executionFinished(TestIdentifier testIdentifier, TestExecutionResult testExecutionResult) Description copied from interface:TestExecutionListener
Called when the execution of a leaf or subtree of theTestPlan
has finished, regardless of the outcome.The
TestIdentifier
may represent a test or a container.This method will only be called if the test or container has not been skipped.
This method will be called for a container
TestIdentifier
after all of its children have been skipped or have finished.The
TestExecutionResult
describes the result of the execution for the suppliedTestIdentifier
. The result does not include or aggregate the results of its children. For example, a container with a failing test will be reported asSUCCESSFUL
even if one or more of its children are reported asFAILED
.- Specified by:
executionFinished
in interfaceTestExecutionListener
- Parameters:
testIdentifier
- the identifier of the finished test or containertestExecutionResult
- the (unaggregated) result of the execution for the suppliedTestIdentifier
- See Also:
-
formatTestIdentifier
-
println
-
collectDisplayNames
-
indented
-
listTests
- Specified by:
listTests
in interfaceDetailsPrintingListener
-
shouldPrint
-