C - the type of EngineExecutionContext used by this engine@API(status=MAINTAINED,
since="1.0")
public abstract class HierarchicalTestEngine<C extends EngineExecutionContext>
extends Object
implements TestEngine
TestEngine implementations that wish
to organize test suites hierarchically based on the Node abstraction.Node| Constructor and Description |
|---|
HierarchicalTestEngine() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract C |
createExecutionContext(ExecutionRequest request)
Create the initial execution context for executing the supplied
request.
|
protected HierarchicalTestExecutorService |
createExecutorService(ExecutionRequest request)
Create the executor service
to use for executing the supplied request.
|
protected ThrowableCollector.Factory |
createThrowableCollectorFactory(ExecutionRequest request)
Create the factory for creating
ThrowableCollector instances used to handle exceptions that occur
during execution of this engine's tests. |
void |
execute(ExecutionRequest request)
Create an executor
service; create an initial execution
context; execute the behavior of all nodes in the
hierarchy starting with the supplied
request's
root and notify
its execution
listener of test execution events. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdiscover, getArtifactId, getGroupId, getId, getVersionpublic final void execute(ExecutionRequest request)
request's
root and notify
its execution
listener of test execution events.execute in interface TestEnginerequest - the request to execute tests for; never nullNode,
createExecutorService(org.junit.platform.engine.ExecutionRequest),
createExecutionContext(org.junit.platform.engine.ExecutionRequest)@API(status=EXPERIMENTAL,
since="1.3")
protected HierarchicalTestExecutorService createExecutorService(ExecutionRequest request)
An engine may use the information in the supplied request such as the contained configuration parameters to decide what kind of service to return or how to configure it.
By default, this method returns an instance of
SameThreadHierarchicalTestExecutorService.
request - the request about to be executedForkJoinPoolHierarchicalTestExecutorService,
SameThreadHierarchicalTestExecutorService@API(status=EXPERIMENTAL,
since="1.3")
protected ThrowableCollector.Factory createThrowableCollectorFactory(ExecutionRequest request)
ThrowableCollector instances used to handle exceptions that occur
during execution of this engine's tests.
An engine may use the information in the supplied request such as the contained configuration parameters to decide what kind of factory to return or how to configure it.
By default, this method returns a factory that always creates instances of
OpenTest4JAwareThrowableCollector.
request - the request about to be executedOpenTest4JAwareThrowableCollector,
ThrowableCollectorprotected abstract C createExecutionContext(ExecutionRequest request)
request - the request about to be executedCopyright © 2024. All rights reserved.