Class ExecutionRecorder
java.lang.Object
org.junit.platform.testkit.engine.ExecutionRecorder
- All Implemented Interfaces:
org.junit.platform.engine.EngineExecutionListener
@API(status=MAINTAINED,
since="1.7")
public class ExecutionRecorder
extends Object
implements org.junit.platform.engine.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.- Since:
- 1.4
- See Also:
-
Field Summary
Fields inherited from interface org.junit.platform.engine.EngineExecutionListener
NOOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddynamicTestRegistered(org.junit.platform.engine.TestDescriptor testDescriptor) Record anEventfor a dynamically registered container or test.voidexecutionFinished(org.junit.platform.engine.TestDescriptor testDescriptor, org.junit.platform.engine.TestExecutionResult testExecutionResult) Record anEventfor a container or test that completed with the providedTestExecutionResult.voidexecutionSkipped(org.junit.platform.engine.TestDescriptor testDescriptor, String reason) Record anEventfor a container or test that was skipped.voidexecutionStarted(org.junit.platform.engine.TestDescriptor testDescriptor) Record anEventfor a container or test that started.Get the state of the engine's execution in the form ofEngineExecutionResults.voidreportingEntryPublished(org.junit.platform.engine.TestDescriptor testDescriptor, org.junit.platform.engine.reporting.ReportEntry entry) Record anEventfor a publishedReportEntry.
-
Constructor Details
-
ExecutionRecorder
public ExecutionRecorder()
-
-
Method Details
-
dynamicTestRegistered
public void dynamicTestRegistered(org.junit.platform.engine.TestDescriptor testDescriptor) Record anEventfor a dynamically registered container or test.- Specified by:
dynamicTestRegisteredin interfaceorg.junit.platform.engine.EngineExecutionListener
-
executionSkipped
public void executionSkipped(org.junit.platform.engine.TestDescriptor testDescriptor, String reason) Record anEventfor a container or test that was skipped.- Specified by:
executionSkippedin interfaceorg.junit.platform.engine.EngineExecutionListener
-
executionStarted
public void executionStarted(org.junit.platform.engine.TestDescriptor testDescriptor) Record anEventfor a container or test that started.- Specified by:
executionStartedin interfaceorg.junit.platform.engine.EngineExecutionListener
-
executionFinished
public void executionFinished(org.junit.platform.engine.TestDescriptor testDescriptor, org.junit.platform.engine.TestExecutionResult testExecutionResult) Record anEventfor a container or test that completed with the providedTestExecutionResult.- Specified by:
executionFinishedin interfaceorg.junit.platform.engine.EngineExecutionListener
-
reportingEntryPublished
public void reportingEntryPublished(org.junit.platform.engine.TestDescriptor testDescriptor, org.junit.platform.engine.reporting.ReportEntry entry) Record anEventfor a publishedReportEntry.- Specified by:
reportingEntryPublishedin interfaceorg.junit.platform.engine.EngineExecutionListener
-
getExecutionResults
Get the state of the engine's execution in the form ofEngineExecutionResults.- Returns:
- the
EngineExecutionResultscontaining all current state information
-