Top Inners Fields Constructors Methods
org.junit.jupiter.engine.descriptor

public abstract Class JupiterTestDescriptor

extends AbstractTestDescriptor
implements Node<JupiterEngineExecutionContext>
Class Inheritance
All Implemented Interfaces
org.junit.platform.engine.support.hierarchical.Node
Known Direct Subclasses
org.junit.jupiter.engine.descriptor.MethodBasedTestDescriptor, org.junit.jupiter.engine.descriptor.DynamicNodeTestDescriptor, org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor, org.junit.jupiter.engine.descriptor.ClassTemplateInvocationTestDescriptor
Annotations
@API
status:INTERNAL
since:5.0
Static Imports
java.util.Collections.emptySet, java.util.stream.Collectors.collectingAndThen, .Collectors.toCollection, .Collectors.toSet, org.apiguardian.api.API.Status.INTERNAL, org.junit.jupiter.engine.descriptor.DisplayNameUtils.determineDisplayName, org.junit.platform.commons.support.AnnotationSupport.findAnnotation, .AnnotationSupport.findRepeatableAnnotations

Since
5.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static interface

Field Summary

Modifier and TypeField and Description
private static final ConditionEvaluator
pack-priv final JupiterConfiguration
Inherited from org.junit.platform.engine.support.descriptor.AbstractTestDescriptor:
children

Constructor Summary

AccessConstructor and Description
pack-priv
JupiterTestDescriptor(UniqueId uniqueId, AnnotatedElement element, Supplier<String> displayNameSupplier, @Nullable TestSource source, JupiterConfiguration configuration)

pack-priv
JupiterTestDescriptor(UniqueId uniqueId, String displayName, @Nullable TestSource source, JupiterConfiguration configuration)

Method Summary

Modifier and TypeMethod and Description
public void
cleanUp(JupiterEngineExecutionContext context)

Overrides default org.junit.platform.engine.support.hierarchical.Node.cleanUp.

Clean up the supplied context after execution.

protected JupiterTestDescriptor

Returns:

a deep copy (with copies of children) of this descriptor with the supplied unique ID
copyIncludingDescendants
(UnaryOperator<UniqueId> uniqueIdTransformer)

Returns a deep copy (with copies of children) of this descriptor with the supplied unique ID.

pack-priv Optional<Node.ExecutionMode>
public Set<ExclusiveResource>
public Node.ExecutionMode
getExecutionMode()

Overrides default org.junit.platform.engine.support.hierarchical.Node.getExecutionMode.

Get the preferred of execution mode for parallel execution of this node.

pack-priv Optional<Node.ExecutionMode>
pack-priv Optional<Node.ExecutionMode>
pack-priv static Set<TestTag>
getTags(AnnotatedElement element, Supplier<String> elementDescription, Supplier<TestSource> sourceProvider, Consumer<DiscoveryIssue> issueCollector)

pack-priv <E extends Extension> void
invokeExecutionExceptionHandlers(Class<E> handlerType, ExtensionRegistry registry, Throwable throwable, JupiterTestDescriptor.ExceptionHandlerInvoker<E> handlerInvoker)

Invoke exception handlers for the supplied Throwable one-by-one until none are left or the throwable to handle has been swallowed.

private <E extends Extension> void
public abstract JupiterEngineExecutionContext
prepare(JupiterEngineExecutionContext context)

Redeclares as abstract: org.junit.platform.engine.support.hierarchical.Node.prepare.

Must be overridden and return a new context with a new ExtensionContext so cleanUp() does not accidentally close the parent context.

public Node.SkipResult
shouldBeSkipped(JupiterEngineExecutionContext context)

Overrides default org.junit.platform.engine.support.hierarchical.Node.shouldBeSkipped.

Determine if the execution of the supplied context should be skipped.

public static Node.ExecutionMode
private Node.SkipResult
protected abstract JupiterTestDescriptor

Returns:

shallow copy (without children) of this descriptor with the supplied unique ID
withUniqueId
(UnaryOperator<UniqueId> uniqueIdTransformer)

Returns shallow copy (without children) of this descriptor with the supplied unique ID.

Inherited from org.junit.platform.engine.support.descriptor.AbstractTestDescriptor:
addChildequalsfindByUniqueIdgetChildrengetDisplayNamegetParentgetSourcegetTagsgetUniqueIdhashCodeorderChildrenremoveChildremoveFromHierarchysetParenttoString

Field Detail

conditionEvaluatorback to summary
private static final ConditionEvaluator conditionEvaluator
configurationback to summary
pack-priv final JupiterConfiguration configuration

Constructor Detail

JupiterTestDescriptorback to summary
pack-priv JupiterTestDescriptor(UniqueId uniqueId, AnnotatedElement element, Supplier<String> displayNameSupplier, @Nullable TestSource source, JupiterConfiguration configuration)
JupiterTestDescriptorback to summary
pack-priv JupiterTestDescriptor(UniqueId uniqueId, String displayName, @Nullable TestSource source, JupiterConfiguration configuration)

Method Detail

cleanUpback to summary
public void cleanUp(JupiterEngineExecutionContext context) throws Exception

Overrides default org.junit.platform.engine.support.hierarchical.Node.cleanUp.

Doc from org.junit.platform.engine.support.hierarchical.Node.cleanUp.

Clean up the supplied context after execution.

The default implementation does nothing.

Annotations
@Override
copyIncludingDescendantsback to summary
protected JupiterTestDescriptor copyIncludingDescendants(UnaryOperator<UniqueId> uniqueIdTransformer)

Returns a deep copy (with copies of children) of this descriptor with the supplied unique ID.

Returns:JupiterTestDescriptor

a deep copy (with copies of children) of this descriptor with the supplied unique ID

getDefaultChildExecutionModeback to summary
pack-priv Optional<Node.ExecutionMode> getDefaultChildExecutionMode()
getExclusiveResourcesback to summary
public Set<ExclusiveResource> getExclusiveResources()

Overrides default org.junit.platform.engine.support.hierarchical.Node.getExclusiveResources.

Doc from org.junit.platform.engine.support.hierarchical.Node.getExclusiveResources.

Get the set of exclusive resources required to execute this node.

The default implementation returns an empty set.

Annotations
@Override
getExecutionModeback to summary
public Node.ExecutionMode getExecutionMode()

Overrides default org.junit.platform.engine.support.hierarchical.Node.getExecutionMode.

Doc from org.junit.platform.engine.support.hierarchical.Node.getExecutionMode.

Get the preferred of execution mode for parallel execution of this node.

The default implementation returns ExecutionMode#CONCURRENT.

Annotations
@Override
getExecutionModeFromAnnotationback to summary
pack-priv Optional<Node.ExecutionMode> getExecutionModeFromAnnotation(AnnotatedElement element)
getExplicitExecutionModeback to summary
pack-priv Optional<Node.ExecutionMode> getExplicitExecutionMode()
getTagsback to summary
pack-priv static Set<TestTag> getTags(AnnotatedElement element, Supplier<String> elementDescription, Supplier<TestSource> sourceProvider, Consumer<DiscoveryIssue> issueCollector)
invokeExecutionExceptionHandlersback to summary
pack-priv <E extends Extension> void invokeExecutionExceptionHandlers(Class<E> handlerType, ExtensionRegistry registry, Throwable throwable, JupiterTestDescriptor.ExceptionHandlerInvoker<E> handlerInvoker)

Invoke exception handlers for the supplied Throwable one-by-one until none are left or the throwable to handle has been swallowed.

invokeExecutionExceptionHandlersback to summary
private <E extends Extension> void invokeExecutionExceptionHandlers(List<E> exceptionHandlers, Throwable throwable, JupiterTestDescriptor.ExceptionHandlerInvoker<E> handlerInvoker)
prepareback to summary
public abstract JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context) throws Exception

Redeclares as abstract: org.junit.platform.engine.support.hierarchical.Node.prepare.

Must be overridden and return a new context with a new ExtensionContext so cleanUp() does not accidentally close the parent context.

Annotations
@Override
shouldBeSkippedback to summary
public Node.SkipResult shouldBeSkipped(JupiterEngineExecutionContext context)

Overrides default org.junit.platform.engine.support.hierarchical.Node.shouldBeSkipped.

Doc from org.junit.platform.engine.support.hierarchical.Node.shouldBeSkipped.

Determine if the execution of the supplied context should be skipped.

The default implementation returns SkipResult#doNotSkip().

Annotations
@Override
toExecutionModeback to summary
public static Node.ExecutionMode toExecutionMode(ExecutionMode mode)
toSkipResultback to summary
private Node.SkipResult toSkipResult(ConditionEvaluationResult evaluationResult)
withUniqueIdback to summary
protected abstract JupiterTestDescriptor withUniqueId(UnaryOperator<UniqueId> uniqueIdTransformer)

Returns shallow copy (without children) of this descriptor with the supplied unique ID.

Returns:JupiterTestDescriptor

shallow copy (without children) of this descriptor with the supplied unique ID

org.junit.jupiter.engine.descriptor back to summary

pack-priv Interface JupiterTestDescriptor.ExceptionHandlerInvoker<E extends Extension>

Annotations
@FunctionalInterface

Since
5.5

Method Summary

Modifier and TypeMethod and Description
public void
invoke(E exceptionHandler, Throwable throwable)

Invoke the supplied exceptionHandler with the supplied throwable.

Method Detail

invokeback to summary
public void invoke(E exceptionHandler, Throwable throwable) throws Throwable

Invoke the supplied exceptionHandler with the supplied throwable.