- java.lang.Object
-
- org.junit.platform.testkit.engine.ExecutionRecorder
-
- All Implemented Interfaces:
EngineExecutionListener
@API(status=MAINTAINED, since="1.7") public class ExecutionRecorder extends Object implements EngineExecutionListener
ExecutionRecorderis anEngineExecutionListenerthat records data from every event that occurs during the engine execution lifecycle and provides functionality for retrieving execution state viaEngineExecutionResults.- Since:
- 1.4
- See Also:
EngineExecutionResults,Event,Execution
-
-
Field Summary
-
Fields inherited from interface org.junit.platform.engine.EngineExecutionListener
NOOP
-
-
Constructor Summary
Constructors Constructor Description ExecutionRecorder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddynamicTestRegistered(TestDescriptor testDescriptor)Record anEventfor a dynamically registered container or test.voidexecutionFinished(TestDescriptor testDescriptor, TestExecutionResult testExecutionResult)Record anEventfor a container or test that completed with the providedTestExecutionResult.voidexecutionSkipped(TestDescriptor testDescriptor, String reason)Record anEventfor a container or test that was skipped.voidexecutionStarted(TestDescriptor testDescriptor)Record anEventfor a container or test that started.EngineExecutionResultsgetExecutionResults()Get the state of the engine's execution in the form ofEngineExecutionResults.voidreportingEntryPublished(TestDescriptor testDescriptor, ReportEntry entry)Record anEventfor a publishedReportEntry.
-
-
-
Method Detail
-
dynamicTestRegistered
public void dynamicTestRegistered(TestDescriptor testDescriptor)
Record anEventfor a dynamically registered container or test.- Specified by:
dynamicTestRegisteredin interfaceEngineExecutionListener- Parameters:
testDescriptor- the descriptor of the newly registered test or container
-
executionSkipped
public void executionSkipped(TestDescriptor testDescriptor, String reason)
Record anEventfor a container or test that was skipped.- Specified by:
executionSkippedin interfaceEngineExecutionListener- Parameters:
testDescriptor- the descriptor of the skipped test or containerreason- a human-readable message describing why the execution has been skipped
-
executionStarted
public void executionStarted(TestDescriptor testDescriptor)
Record anEventfor a container or test that started.- Specified by:
executionStartedin interfaceEngineExecutionListener- Parameters:
testDescriptor- the descriptor of the started test or container
-
executionFinished
public void executionFinished(TestDescriptor testDescriptor, TestExecutionResult testExecutionResult)
Record anEventfor a container or test that completed with the providedTestExecutionResult.- Specified by:
executionFinishedin interfaceEngineExecutionListener- Parameters:
testDescriptor- the descriptor of the finished test or containertestExecutionResult- the (unaggregated) result of the execution for the suppliedTestDescriptor- See Also:
TestExecutionResult
-
reportingEntryPublished
public void reportingEntryPublished(TestDescriptor testDescriptor, ReportEntry entry)
Record anEventfor a publishedReportEntry.- Specified by:
reportingEntryPublishedin interfaceEngineExecutionListener- Parameters:
testDescriptor- the descriptor of the test or container to which the reporting entry belongsentry- aReportEntryinstance to be published
-
getExecutionResults
public EngineExecutionResults getExecutionResults()
Get the state of the engine's execution in the form ofEngineExecutionResults.- Returns:
- the
EngineExecutionResultscontaining all current state information
-
-