Class JupiterTestEngine
- All Implemented Interfaces:
TestEngine
TestEngine.- Since:
- 5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JupiterEngineExecutionContextcreateExecutionContext(ExecutionRequest request) Create the initial execution context for executing the supplied request.protected HierarchicalTestExecutorServicecreateExecutorService(ExecutionRequest request) Create the executor service to use for executing the supplied request.protected ThrowableCollector.FactoryCreate the factory for creatingThrowableCollectorinstances used to handle exceptions that occur during execution of this engine's tests.discover(EngineDiscoveryRequest discoveryRequest, UniqueId uniqueId) Discover tests according to the suppliedEngineDiscoveryRequest.Returnsjunit-jupiter-engineas the artifact ID.Returnsorg.junit.jupiteras the group ID.getId()Get the ID that uniquely identifies this test engine.Methods inherited from class org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine
executeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.junit.platform.engine.TestEngine
getVersion
-
Constructor Details
-
JupiterTestEngine
public JupiterTestEngine()
-
-
Method Details
-
getId
Description copied from interface:TestEngineGet the ID that uniquely identifies this test engine.Each test engine must provide a unique ID. For example, JUnit Vintage and JUnit Jupiter use
"junit-vintage"and"junit-jupiter", respectively. When in doubt, you may use the fully qualified name of your customTestEngineimplementation class.- Returns:
- the ID of this test engine; never
nullor blank
-
getGroupId
-
getArtifactId
-
discover
Description copied from interface:TestEngineDiscover tests according to the suppliedEngineDiscoveryRequest.The supplied
UniqueIdmust be used as the unique ID of the returned rootTestDescriptor. In addition, theUniqueIdmust be used to create unique IDs for children of the root's descriptor by callingUniqueId.append(java.lang.String, java.lang.String).- Parameters:
discoveryRequest- the discovery request; nevernulluniqueId- the unique ID to be used for this test engine'sTestDescriptor; nevernull- Returns:
- the root
TestDescriptorof this engine, typically an instance ofEngineDescriptor - See Also:
-
createExecutorService
Description copied from class:HierarchicalTestEngineCreate the executor service to use for executing the supplied 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.- Overrides:
createExecutorServicein classHierarchicalTestEngine<JupiterEngineExecutionContext>- Parameters:
request- the request about to be executed- See Also:
-
createExecutionContext
Description copied from class:HierarchicalTestEngineCreate the initial execution context for executing the supplied request.- Specified by:
createExecutionContextin classHierarchicalTestEngine<JupiterEngineExecutionContext>- Parameters:
request- the request about to be executed- Returns:
- the initial context that will be passed to nodes in the hierarchy
-
createThrowableCollectorFactory
Description copied from class:HierarchicalTestEngineCreate the factory for creatingThrowableCollectorinstances 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.- Overrides:
createThrowableCollectorFactoryin classHierarchicalTestEngine<JupiterEngineExecutionContext>- Parameters:
request- the request about to be executed- Since:
- 5.4
- See Also:
-