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
FieldsFields 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.voidfileEntryPublished(org.junit.platform.engine.TestDescriptor testDescriptor, org.junit.platform.engine.reporting.FileEntry file) Record anEventfor a publishedFileEntry.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.
-
Field Details
-
events
-
-
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
-
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
-
fileEntryPublished
@API(status=MAINTAINED, since="1.13.3") public void fileEntryPublished(org.junit.platform.engine.TestDescriptor testDescriptor, org.junit.platform.engine.reporting.FileEntry file) Record anEventfor a publishedFileEntry.- Specified by:
fileEntryPublishedin interfaceorg.junit.platform.engine.EngineExecutionListener- Since:
- 1.12
-
getExecutionResults
Get the state of the engine's execution in the form ofEngineExecutionResults.- Returns:
- the
EngineExecutionResultscontaining all current state information
-