@API(status=MAINTAINED,
since="1.7")
public class ExecutionRecorder
extends java.lang.Object
implements EngineExecutionListener
ExecutionRecorder is an EngineExecutionListener that records
data from every event that occurs during the engine execution lifecycle and
provides functionality for retrieving execution state via
EngineExecutionResults.EngineExecutionResults,
Event,
Execution| Modifier and Type | Field and Description |
|---|---|
private java.util.List<Event> |
events |
NOOP| Constructor and Description |
|---|
ExecutionRecorder() |
| Modifier and Type | Method and Description |
|---|---|
void |
dynamicTestRegistered(TestDescriptor testDescriptor)
Record an
Event for a dynamically registered container
or test. |
void |
executionFinished(TestDescriptor testDescriptor,
TestExecutionResult testExecutionResult)
Record an
Event for a container or test that completed
with the provided TestExecutionResult. |
void |
executionSkipped(TestDescriptor testDescriptor,
java.lang.String reason)
Record an
Event for a container or test that was skipped. |
void |
executionStarted(TestDescriptor testDescriptor)
Record an
Event for a container or test that started. |
EngineExecutionResults |
getExecutionResults()
Get the state of the engine's execution in the form of
EngineExecutionResults. |
void |
reportingEntryPublished(TestDescriptor testDescriptor,
ReportEntry entry)
Record an
Event for a published ReportEntry. |
private final java.util.List<Event> events
public void dynamicTestRegistered(TestDescriptor testDescriptor)
Event for a dynamically registered container
or test.dynamicTestRegistered in interface EngineExecutionListenertestDescriptor - the descriptor of the newly registered test
or containerpublic void executionSkipped(TestDescriptor testDescriptor, java.lang.String reason)
Event for a container or test that was skipped.executionSkipped in interface EngineExecutionListenertestDescriptor - the descriptor of the skipped test or containerreason - a human-readable message describing why the execution
has been skippedpublic void executionStarted(TestDescriptor testDescriptor)
Event for a container or test that started.executionStarted in interface EngineExecutionListenertestDescriptor - the descriptor of the started test or containerpublic void executionFinished(TestDescriptor testDescriptor, TestExecutionResult testExecutionResult)
Event for a container or test that completed
with the provided TestExecutionResult.executionFinished in interface EngineExecutionListenertestDescriptor - the descriptor of the finished test or containertestExecutionResult - the (unaggregated) result of the execution for
the supplied TestDescriptorTestExecutionResultpublic void reportingEntryPublished(TestDescriptor testDescriptor, ReportEntry entry)
Event for a published ReportEntry.reportingEntryPublished in interface EngineExecutionListenertestDescriptor - the descriptor of the test or container to which
the reporting entry belongsentry - a ReportEntry instance to be publishedpublic EngineExecutionResults getExecutionResults()
EngineExecutionResults.EngineExecutionResults containing all current state information