java.lang.Object
org.junit.platform.engine.ExecutionRequest
Provides a single
TestEngine
access to the information necessary to
execute its tests.
A request contains an engine's root TestDescriptor
, the
EngineExecutionListener
to be notified of test execution events, the
ConfigurationParameters
that the engine may use to influence test
execution, and an OutputDirectoryProvider
for writing reports and
other output files.
- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorDescriptionExecutionRequest
(TestDescriptor rootTestDescriptor, EngineExecutionListener engineExecutionListener, ConfigurationParameters configurationParameters) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutionRequest
create
(TestDescriptor rootTestDescriptor, EngineExecutionListener engineExecutionListener, ConfigurationParameters configurationParameters) Deprecated.static ExecutionRequest
create
(TestDescriptor rootTestDescriptor, EngineExecutionListener engineExecutionListener, ConfigurationParameters configurationParameters, OutputDirectoryProvider outputDirectoryProvider) Factory for creating an execution request.Returns theConfigurationParameters
that the engine may use to influence test execution.Returns theEngineExecutionListener
to be notified of test execution events.Returns theOutputDirectoryProvider
for this request for writing reports and other output files.Returns the rootTestDescriptor
of the engine that processes this request.
-
Constructor Details
-
ExecutionRequest
@Deprecated @API(status=DEPRECATED, since="1.11") public ExecutionRequest(TestDescriptor rootTestDescriptor, EngineExecutionListener engineExecutionListener, ConfigurationParameters configurationParameters) Deprecated.
-
-
Method Details
-
create
@Deprecated @API(status=DEPRECATED, since="1.11") public static ExecutionRequest create(TestDescriptor rootTestDescriptor, EngineExecutionListener engineExecutionListener, ConfigurationParameters configurationParameters) Deprecated.Factory for creating an execution request.- Parameters:
rootTestDescriptor
- the engine's rootTestDescriptor
engineExecutionListener
- theEngineExecutionListener
to be notified of test execution eventsconfigurationParameters
-ConfigurationParameters
that the engine may use to influence test execution- Returns:
- a new
ExecutionRequest
; nevernull
- Since:
- 1.9
-
create
@API(status=INTERNAL, since="1.12") public static ExecutionRequest create(TestDescriptor rootTestDescriptor, EngineExecutionListener engineExecutionListener, ConfigurationParameters configurationParameters, OutputDirectoryProvider outputDirectoryProvider) Factory for creating an execution request.- Parameters:
rootTestDescriptor
- the engine's rootTestDescriptor
; nevernull
engineExecutionListener
- theEngineExecutionListener
to be notified of test execution events; nevernull
configurationParameters
-ConfigurationParameters
that the engine may use to influence test execution; nevernull
outputDirectoryProvider
-OutputDirectoryProvider
for writing reports and other output files; nevernull
- Returns:
- a new
ExecutionRequest
; nevernull
- Since:
- 1.12
-
getRootTestDescriptor
Returns the rootTestDescriptor
of the engine that processes this request.Note: the root descriptor is the
TestDescriptor
returned byTestEngine.discover(EngineDiscoveryRequest, UniqueId)
.- Returns:
- the root
TestDescriptor
of the engine that processes this request
-
getEngineExecutionListener
Returns theEngineExecutionListener
to be notified of test execution events.- Returns:
- the
EngineExecutionListener
to be notified of test execution events
-
getConfigurationParameters
Returns theConfigurationParameters
that the engine may use to influence test execution.- Returns:
- the
ConfigurationParameters
that the engine may use to influence test execution
-
getOutputDirectoryProvider
Returns theOutputDirectoryProvider
for this request for writing reports and other output files.- Returns:
- the
OutputDirectoryProvider
for this request for writing reports and other output files - Throws:
PreconditionViolationException
- if the output directory provider is not available- Since:
- 1.12
-
create(TestDescriptor, EngineExecutionListener, ConfigurationParameters, OutputDirectoryProvider)