TestEngine
@API(status=INTERNAL, since="5.0") public final class JupiterTestEngine extends HierarchicalTestEngine<JupiterEngineExecutionContext>
TestEngine
.Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
ENGINE_ID |
Constructor | Description |
---|---|
JupiterTestEngine() |
Modifier and Type | Method | 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 . |
java.util.Optional<java.lang.String> |
getArtifactId() |
Returns
junit-jupiter-engine as the artifact ID. |
java.util.Optional<java.lang.String> |
getGroupId() |
Returns
org.junit.jupiter as the group ID. |
java.lang.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 java.lang.String ENGINE_ID
public java.lang.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 java.util.Optional<java.lang.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 java.util.Optional<java.lang.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