@API(status=INTERNAL, since="5.0") public final class JupiterTestEngine extends HierarchicalTestEngine<JupiterEngineExecutionContext>
TestEngine
.Constructor and Description |
---|
JupiterTestEngine() |
Modifier and Type | Method and Description |
---|---|
protected JupiterEngineExecutionContext |
createExecutionContext(ExecutionRequest request)
Create the initial execution context for executing the supplied
request . |
TestDescriptor |
discover(EngineDiscoveryRequest discoveryRequest,
UniqueId uniqueId)
Discover tests according to the supplied
EngineDiscoveryRequest . |
Optional<String> |
getArtifactId()
Returns
junit-jupiter-engine as the artifact ID. |
Optional<String> |
getGroupId()
Returns
org.junit.jupiter as the group ID. |
String |
getId()
Get the ID that uniquely identifies this test engine.
|
execute
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getVersion
public static final String ENGINE_ID
public String getId()
TestEngine
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
custom TestEngine
implementation class.
public Optional<String> getGroupId()
org.junit.jupiter
as the group ID.Optional
containing the group ID; never null
but potentially empty if the group ID is unknownTestEngine.getArtifactId()
,
TestEngine.getVersion()
public Optional<String> getArtifactId()
junit-jupiter-engine
as the artifact ID.Optional
containing the artifact ID; never
null
but potentially empty if the artifact ID is unknownClass.getPackage()
,
Package.getImplementationTitle()
,
TestEngine.getGroupId()
,
TestEngine.getVersion()
public TestDescriptor discover(EngineDiscoveryRequest discoveryRequest, UniqueId uniqueId)
TestEngine
EngineDiscoveryRequest
.
The supplied UniqueId
must be used as the unique ID of the
returned root TestDescriptor
. In addition, the UniqueId
must be used to create unique IDs for children of the root's descriptor
by calling UniqueId.append(java.lang.String, java.lang.String)
.
discoveryRequest
- the discovery request; never null
uniqueId
- the unique ID to be used for this test engine's
TestDescriptor
; never null
TestDescriptor
of this engine, typically an
instance of EngineDescriptor
EngineDescriptor
protected JupiterEngineExecutionContext createExecutionContext(ExecutionRequest request)
HierarchicalTestEngine
request
.createExecutionContext
in class HierarchicalTestEngine<JupiterEngineExecutionContext>
request
- the request about to be executed