@API(status=INTERNAL, since="4.12") public final class VintageTestEngine extends Object implements TestEngine
TestEngine
.Constructor and Description |
---|
VintageTestEngine() |
Modifier and Type | Method and Description |
---|---|
TestDescriptor |
discover(EngineDiscoveryRequest discoveryRequest,
UniqueId uniqueId)
Discover tests according to the supplied
EngineDiscoveryRequest . |
void |
execute(ExecutionRequest request)
Execute tests according to the supplied
ExecutionRequest . |
Optional<String> |
getArtifactId()
Returns
junit-vintage-engine as the artifact ID. |
Optional<String> |
getGroupId()
Returns
org.junit.vintage as the group ID. |
String |
getId()
Get the ID that uniquely identifies this test engine.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getVersion
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.
getId
in interface TestEngine
public Optional<String> getGroupId()
org.junit.vintage
as the group ID.getGroupId
in interface TestEngine
Optional
containing the group ID; never null
but potentially empty if the group ID is unknownTestEngine.getArtifactId()
,
TestEngine.getVersion()
public Optional<String> getArtifactId()
junit-vintage-engine
as the artifact ID.getArtifactId
in interface TestEngine
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)
.
discover
in interface TestEngine
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
public void execute(ExecutionRequest request)
TestEngine
ExecutionRequest
.
The request
passed to this method contains the root
TestDescriptor
that was previously returned by TestEngine.discover(org.junit.platform.engine.EngineDiscoveryRequest, org.junit.platform.engine.UniqueId)
,
the EngineExecutionListener
to be notified of test execution
events, and ConfigurationParameters
that may influence test execution.
execute
in interface TestEngine
request
- the request to execute tests for; never null