Top Description Constructors Methods
org.junit.jupiter.engine

public final Class JupiterTestEngine

extends HierarchicalTestEngine<JupiterEngineExecutionContext>
Class Inheritance
Annotations
@API
status:INTERNAL
since:5.0
Static Imports
org.apiguardian.api.API.Status.INTERNAL

The JUnit Jupiter TestEngine.
Since
5.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected JupiterEngineExecutionContext
createExecutionContext(ExecutionRequest
the request about to be executed
request
)

Implements abstract org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.createExecutionContext.

Create the initial execution context for executing the supplied request.
protected HierarchicalTestExecutorService
createExecutorService(ExecutionRequest
the request about to be executed
request
)

Overrides org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.createExecutorService.

Create the executor service to use for executing the supplied request.
protected ThrowableCollector.Factory
createThrowableCollectorFactory(ExecutionRequest
the request about to be executed
request
)

Overrides org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.createThrowableCollectorFactory.

Create the factory for creating ThrowableCollector instances used to handle exceptions that occur during execution of this engine's tests.
public TestDescriptor
discover(EngineDiscoveryRequest
the discovery request; never null
discoveryRequest
,
UniqueId
the unique ID to be used for this test engine's TestDescriptor; never null
uniqueId
)

Implements org.junit.platform.engine.TestEngine.discover.

Discover tests according to the supplied EngineDiscoveryRequest.
public Optional<String>
getArtifactId()

Overrides default org.junit.platform.engine.TestEngine.getArtifactId.

Returns junit-jupiter-engine as the artifact ID.
public Optional<String>
getGroupId()

Overrides default org.junit.platform.engine.TestEngine.getGroupId.

Returns org.junit.jupiter as the group ID.
public String
getId()

Implements org.junit.platform.engine.TestEngine.getId.

Get the ID that uniquely identifies this test engine.
private JupiterConfiguration
Inherited from org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine:
execute

Constructor Detail

JupiterTestEngineback to summary
public JupiterTestEngine()

Method Detail

createExecutionContextback to summary
protected JupiterEngineExecutionContext createExecutionContext(ExecutionRequest request)

Implements abstract org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.createExecutionContext.

Doc from org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.createExecutionContext.

Create the initial execution context for executing the supplied request.

Parameters
request:ExecutionRequest

the request about to be executed

Returns:JupiterEngineExecutionContext

the initial context that will be passed to nodes in the hierarchy

Annotations
@Override
createExecutorServiceback to summary
protected HierarchicalTestExecutorService createExecutorService(ExecutionRequest request)

Overrides org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.createExecutorService.

Doc from org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.createExecutorService.

Create 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.

Parameters
request:ExecutionRequest

the request about to be executed

Annotations
@Override
createThrowableCollectorFactoryback to summary
protected ThrowableCollector.Factory createThrowableCollectorFactory(ExecutionRequest request)

Overrides org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.createThrowableCollectorFactory.

Doc from org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.createThrowableCollectorFactory.

Create the factory for creating ThrowableCollector instances 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.

Parameters
request:ExecutionRequest

the request about to be executed

Annotations
@Override
Since
5.4
discoverback to summary
public TestDescriptor discover(EngineDiscoveryRequest discoveryRequest, UniqueId uniqueId)

Implements org.junit.platform.engine.TestEngine.discover.

Doc from org.junit.platform.engine.TestEngine.discover.

Discover tests according to the supplied 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.

Parameters
discoveryRequest:EngineDiscoveryRequest

the discovery request; never null

uniqueId:UniqueId

the unique ID to be used for this test engine's TestDescriptor; never null

Returns:TestDescriptor

the root TestDescriptor of this engine, typically an instance of EngineDescriptor

Annotations
@Override
getArtifactIdback to summary
public Optional<String> getArtifactId()

Overrides default org.junit.platform.engine.TestEngine.getArtifactId.

Returns junit-jupiter-engine as the artifact ID.

Returns:Optional<String>

Doc from org.junit.platform.engine.TestEngine.getArtifactId.

an Optional containing the artifact ID; never null but potentially empty if the artifact ID is unknown

Annotations
@Override
getGroupIdback to summary
public Optional<String> getGroupId()

Overrides default org.junit.platform.engine.TestEngine.getGroupId.

Returns org.junit.jupiter as the group ID.

Returns:Optional<String>

Doc from org.junit.platform.engine.TestEngine.getGroupId.

an Optional containing the group ID; never null but potentially empty if the group ID is unknown

Annotations
@Override
getIdback to summary
public String getId()

Implements org.junit.platform.engine.TestEngine.getId.

Doc from org.junit.platform.engine.TestEngine.getId.

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 custom TestEngine implementation class.

Annotations
@Override
getJupiterConfigurationback to summary
private JupiterConfiguration getJupiterConfiguration(ExecutionRequest request)