class OutcomeDelayingEngineExecutionListener extends DelegatingEngineExecutionListener
Modifier and Type | Class and Description |
---|---|
private static class |
OutcomeDelayingEngineExecutionListener.Outcome |
Modifier and Type | Field and Description |
---|---|
private TestDescriptor |
engineDescriptor |
private boolean |
engineStarted |
private TestExecutionResult |
executionResult |
private OutcomeDelayingEngineExecutionListener.Outcome |
outcome |
private java.lang.String |
skipReason |
Constructor and Description |
---|
OutcomeDelayingEngineExecutionListener(EngineExecutionListener delegate,
TestDescriptor engineDescriptor) |
Modifier and Type | Method and Description |
---|---|
void |
executionFinished(TestDescriptor testDescriptor,
TestExecutionResult executionResult)
Must be called when the execution of a leaf or subtree of the test tree
has finished, regardless of the outcome.
|
void |
executionSkipped(TestDescriptor testDescriptor,
java.lang.String reason)
Must be called when the execution of a leaf or subtree of the test tree
has been skipped.
|
void |
executionStarted(TestDescriptor testDescriptor)
Must be called when the execution of a leaf or subtree of the test tree
is about to be started.
|
(package private) void |
reportEngineFailure(java.lang.Throwable throwable) |
(package private) void |
reportEngineOutcome() |
dynamicTestRegistered, reportingEntryPublished
private final TestDescriptor engineDescriptor
private volatile boolean engineStarted
private volatile OutcomeDelayingEngineExecutionListener.Outcome outcome
private volatile java.lang.String skipReason
private volatile TestExecutionResult executionResult
OutcomeDelayingEngineExecutionListener(EngineExecutionListener delegate, TestDescriptor engineDescriptor)
public void executionSkipped(TestDescriptor testDescriptor, java.lang.String reason)
EngineExecutionListener
The TestDescriptor
may represent a test or a container. In the
case of a container, engines must not fire any additional events for its
descendants.
A skipped test or subtree of tests must not be reported as started or finished.
executionSkipped
in interface EngineExecutionListener
executionSkipped
in class DelegatingEngineExecutionListener
testDescriptor
- the descriptor of the skipped test or containerreason
- a human-readable message describing why the execution
has been skippedpublic void executionStarted(TestDescriptor testDescriptor)
EngineExecutionListener
The TestDescriptor
may represent a test or a container. In the
case of a container, engines have to fire additional events for its
children.
This method may only be called if the test or container has not been skipped.
This method must be called for a container TestDescriptor
before starting or
skipping any of its children.
executionStarted
in interface EngineExecutionListener
executionStarted
in class DelegatingEngineExecutionListener
testDescriptor
- the descriptor of the started test or containerpublic void executionFinished(TestDescriptor testDescriptor, TestExecutionResult executionResult)
EngineExecutionListener
The TestDescriptor
may represent a test or a container.
This method may only be called if the test or container has not been skipped.
This method must 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 supplied testDescriptor
. The result does not include or
aggregate the results of its children. For example, a container with a
failing test must be reported as SUCCESSFUL
even
if one or more of its children are reported as FAILED
.
executionFinished
in interface EngineExecutionListener
executionFinished
in class DelegatingEngineExecutionListener
testDescriptor
- the descriptor of the finished test or containerexecutionResult
- the (unaggregated) result of the execution for
the supplied TestDescriptor
TestExecutionResult
void reportEngineOutcome()
void reportEngineFailure(java.lang.Throwable throwable)