Class SuiteTestEngine
- All Implemented Interfaces:
TestEngine
TestEngine
.- Since:
- 1.8
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondiscover
(EngineDiscoveryRequest discoveryRequest, UniqueId uniqueId) Discover tests according to the suppliedEngineDiscoveryRequest
.void
execute
(ExecutionRequest request) Execute tests according to the suppliedExecutionRequest
.Returnsjunit-platform-suite-engine
as the artifact ID.Returnsorg.junit.platform
as the group ID.getId()
Get the ID that uniquely identifies this test engine.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.junit.platform.engine.TestEngine
getVersion
-
Constructor Details
-
SuiteTestEngine
public SuiteTestEngine()
-
-
Method Details
-
getId
Description copied from interface:TestEngine
Get 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 customTestEngine
implementation class.- Specified by:
getId
in interfaceTestEngine
-
getGroupId
Returnsorg.junit.platform
as the group ID.- Specified by:
getGroupId
in interfaceTestEngine
- Returns:
- an
Optional
containing the group ID; nevernull
but potentially empty if the group ID is unknown - See Also:
-
getArtifactId
Returnsjunit-platform-suite-engine
as the artifact ID.- Specified by:
getArtifactId
in interfaceTestEngine
- Returns:
- an
Optional
containing the artifact ID; nevernull
but potentially empty if the artifact ID is unknown - See Also:
-
discover
Description copied from interface:TestEngine
Discover tests according to the suppliedEngineDiscoveryRequest
.The supplied
UniqueId
must be used as the unique ID of the returned rootTestDescriptor
. In addition, theUniqueId
must be used to create unique IDs for children of the root's descriptor by callingUniqueId.append(java.lang.String, java.lang.String)
.- Specified by:
discover
in interfaceTestEngine
- Parameters:
discoveryRequest
- the discovery request; nevernull
uniqueId
- the unique ID to be used for this test engine'sTestDescriptor
; nevernull
- Returns:
- the root
TestDescriptor
of this engine, typically an instance ofEngineDescriptor
- See Also:
-
execute
Description copied from interface:TestEngine
Execute tests according to the suppliedExecutionRequest
.The
request
passed to this method contains the rootTestDescriptor
that was previously returned byTestEngine.discover(org.junit.platform.engine.EngineDiscoveryRequest, org.junit.platform.engine.UniqueId)
, theEngineExecutionListener
to be notified of test execution events, andConfigurationParameters
that may influence test execution.- Specified by:
execute
in interfaceTestEngine
- Parameters:
request
- the request to execute tests for; nevernull
-