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 request)

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

Create the initial execution context for executing the supplied request.

protected HierarchicalTestExecutorService
protected ThrowableCollector.Factory
createThrowableCollectorFactory(ExecutionRequest 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 discoveryRequest, UniqueId 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.

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.

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.

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.

Furthermore, implementations must publish events about test discovery via the supplied EngineDiscoveryListener.

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.

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.

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)