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 java.lang.Object implements org.junit.platform.engine.EngineExecutionListenerExecutionRecorderis 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
-
-
Constructor Summary
Constructors Constructor Description ExecutionRecorder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddynamicTestRegistered(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, java.lang.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.EngineExecutionResultsgetExecutionResults()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 Detail
-
events
private final java.util.List<Event> events
-
-
Method Detail
-
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, java.lang.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
-
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
public EngineExecutionResults getExecutionResults()
Get the state of the engine's execution in the form ofEngineExecutionResults.- Returns:
- the
EngineExecutionResultscontaining all current state information
-
-