Package | Description |
---|---|
org.junit.jupiter.engine |
Core package for the JUnit Jupiter test engine.
|
org.junit.jupiter.engine.descriptor |
Test descriptors used within the JUnit Jupiter test engine.
|
org.junit.jupiter.engine.discovery |
Internal classes for test discovery within the JUnit Jupiter test engine.
|
org.junit.platform.engine |
Public API for test engines.
|
org.junit.platform.engine.support.descriptor |
TestDescriptor -related support classes
intended to be used by test engine implementations and clients of
the launcher. |
org.junit.platform.engine.support.hierarchical |
Support classes and base implementation for any
TestEngine that wishes to organize test suites
hierarchically based on the
Node abstraction. |
org.junit.platform.launcher |
Public API for configuring and launching test plans.
|
org.junit.platform.launcher.core |
Core support classes for the
Launcher
including the LauncherFactory
and the LauncherDiscoveryRequestBuilder . |
org.junit.vintage.engine |
Core package for the JUnit Vintage test engine.
|
org.junit.vintage.engine.descriptor |
Test descriptors used within the JUnit Vintage test engine.
|
org.junit.vintage.engine.discovery |
Internal classes for test discovery within the JUnit Vintage test engine.
|
org.junit.vintage.engine.execution |
Internal classes for test execution within the JUnit Vintage test engine.
|
Modifier and Type | Method and Description |
---|---|
TestDescriptor |
JupiterTestEngine.discover(EngineDiscoveryRequest discoveryRequest,
UniqueId uniqueId) |
Modifier and Type | Class and Description |
---|---|
(package private) class |
AbstractExtensionContext<T extends TestDescriptor> |
Modifier and Type | Field and Description |
---|---|
private T |
AbstractExtensionContext.testDescriptor |
Modifier and Type | Method and Description |
---|---|
private java.util.Optional<TestDescriptor> |
TestTemplateTestDescriptor.createInvocationTestDescriptor(TestTemplateInvocationContext invocationContext,
int index) |
Modifier and Type | Field and Description |
---|---|
private TestDescriptor |
JavaElementsResolver.engineDescriptor |
Modifier and Type | Method and Description |
---|---|
private TestDescriptor |
AbstractMethodResolver.createTestDescriptor(TestDescriptor parent,
java.lang.reflect.Method method) |
protected TestDescriptor |
TestTemplateMethodResolver.createTestDescriptor(UniqueId uniqueId,
java.lang.Class<?> testClass,
java.lang.reflect.Method method,
JupiterConfiguration configuration) |
protected TestDescriptor |
TestMethodResolver.createTestDescriptor(UniqueId uniqueId,
java.lang.Class<?> testClass,
java.lang.reflect.Method method,
JupiterConfiguration configuration) |
protected TestDescriptor |
TestFactoryMethodResolver.createTestDescriptor(UniqueId uniqueId,
java.lang.Class<?> testClass,
java.lang.reflect.Method method,
JupiterConfiguration configuration) |
protected abstract TestDescriptor |
AbstractMethodResolver.createTestDescriptor(UniqueId uniqueId,
java.lang.Class<?> testClass,
java.lang.reflect.Method method,
JupiterConfiguration configuration) |
protected TestDescriptor |
TestContainerResolver.resolveClass(java.lang.Class<?> testClass,
UniqueId uniqueId) |
protected TestDescriptor |
NestedTestsResolver.resolveClass(java.lang.Class<?> testClass,
UniqueId uniqueId) |
Modifier and Type | Method and Description |
---|---|
private java.util.Optional<TestDescriptor> |
JavaElementsResolver.findTestDescriptorByUniqueId(UniqueId uniqueId) |
protected java.lang.Class<? extends TestDescriptor> |
TestContainerResolver.requiredParentType() |
protected java.lang.Class<? extends TestDescriptor> |
NestedTestsResolver.requiredParentType() |
private java.util.Set<TestDescriptor> |
JavaElementsResolver.resolve(java.lang.reflect.AnnotatedElement element,
TestDescriptor parent) |
private java.util.Deque<TestDescriptor> |
JavaElementsResolver.resolveAllSegments(UniqueId uniqueId)
Attempt to resolve all segments for the supplied unique ID.
|
private java.util.Set<TestDescriptor> |
JavaElementsResolver.resolveContainerWithChildren(java.lang.Class<?> containerClass,
java.util.Set<TestDescriptor> potentialParents) |
private java.util.Set<TestDescriptor> |
JavaElementsResolver.resolveContainerWithParents(java.lang.Class<?> testClass) |
java.util.Set<TestDescriptor> |
TestContainerResolver.resolveElement(java.lang.reflect.AnnotatedElement element,
TestDescriptor parent) |
java.util.Set<TestDescriptor> |
ElementResolver.resolveElement(java.lang.reflect.AnnotatedElement element,
TestDescriptor parent)
Return a set of
TestDescriptors that can be
resolved by this resolver. |
java.util.Set<TestDescriptor> |
AbstractMethodResolver.resolveElement(java.lang.reflect.AnnotatedElement element,
TestDescriptor parent) |
private java.util.Set<TestDescriptor> |
JavaElementsResolver.resolveForAllParents(java.lang.reflect.AnnotatedElement element,
java.util.Set<TestDescriptor> potentialParents) |
java.util.Optional<TestDescriptor> |
TestContainerResolver.resolveUniqueId(UniqueId.Segment segment,
TestDescriptor parent) |
java.util.Optional<TestDescriptor> |
ElementResolver.resolveUniqueId(UniqueId.Segment segment,
TestDescriptor parent)
Return an optional
TestDescriptor . |
java.util.Optional<TestDescriptor> |
AbstractMethodResolver.resolveUniqueId(UniqueId.Segment segment,
TestDescriptor parent) |
private java.util.Set<TestDescriptor> |
JavaElementsResolver.tryToResolveWithResolver(java.lang.reflect.AnnotatedElement element,
TestDescriptor parent,
ElementResolver resolver) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
DiscoveryFilterApplier.applyClassNamePredicate(java.util.function.Predicate<java.lang.String> classNamePredicate,
TestDescriptor engineDescriptor) |
private JavaElementsResolver |
DiscoverySelectorResolver.createJavaElementsResolver(JupiterConfiguration configuration,
TestDescriptor engineDescriptor,
ClassFilter classFilter) |
private TestDescriptor |
AbstractMethodResolver.createTestDescriptor(TestDescriptor parent,
java.lang.reflect.Method method) |
protected UniqueId |
TestContainerResolver.createUniqueId(java.lang.Class<?> testClass,
TestDescriptor parent) |
private UniqueId |
AbstractMethodResolver.createUniqueId(java.lang.reflect.Method method,
TestDescriptor parent) |
private void |
DiscoverySelectorResolver.filter(TestDescriptor engineDescriptor,
ClassFilter classFilter) |
protected java.lang.String |
TestContainerResolver.getClassName(TestDescriptor parent,
java.lang.String segmentValue) |
protected java.lang.String |
NestedTestsResolver.getClassName(TestDescriptor parent,
java.lang.String segmentValue) |
private void |
DiscoverySelectorResolver.pruneTree(TestDescriptor rootDescriptor) |
private java.util.Set<TestDescriptor> |
JavaElementsResolver.resolve(java.lang.reflect.AnnotatedElement element,
TestDescriptor parent) |
private void |
DiscoverySelectorResolver.resolve(EngineDiscoveryRequest request,
JupiterConfiguration configuration,
TestDescriptor engineDescriptor,
ClassFilter classFilter) |
private void |
JavaElementsResolver.resolveChildren(TestDescriptor descriptor) |
private void |
JavaElementsResolver.resolveContainedMethods(TestDescriptor containerDescriptor,
java.lang.Class<?> testClass) |
private void |
JavaElementsResolver.resolveContainedNestedClasses(TestDescriptor containerDescriptor,
java.lang.Class<?> clazz) |
java.util.Set<TestDescriptor> |
TestContainerResolver.resolveElement(java.lang.reflect.AnnotatedElement element,
TestDescriptor parent) |
java.util.Set<TestDescriptor> |
ElementResolver.resolveElement(java.lang.reflect.AnnotatedElement element,
TestDescriptor parent)
Return a set of
TestDescriptors that can be
resolved by this resolver. |
java.util.Set<TestDescriptor> |
AbstractMethodResolver.resolveElement(java.lang.reflect.AnnotatedElement element,
TestDescriptor parent) |
void |
DiscoverySelectorResolver.resolveSelectors(EngineDiscoveryRequest request,
JupiterConfiguration configuration,
TestDescriptor engineDescriptor) |
java.util.Optional<TestDescriptor> |
TestContainerResolver.resolveUniqueId(UniqueId.Segment segment,
TestDescriptor parent) |
java.util.Optional<TestDescriptor> |
ElementResolver.resolveUniqueId(UniqueId.Segment segment,
TestDescriptor parent)
Return an optional
TestDescriptor . |
java.util.Optional<TestDescriptor> |
AbstractMethodResolver.resolveUniqueId(UniqueId.Segment segment,
TestDescriptor parent) |
private java.util.Set<TestDescriptor> |
JavaElementsResolver.tryToResolveWithResolver(java.lang.reflect.AnnotatedElement element,
TestDescriptor parent,
ElementResolver resolver) |
Modifier and Type | Method and Description |
---|---|
private void |
JavaElementsResolver.handleResolvedDescriptorsForUniqueId(UniqueId uniqueId,
java.util.Deque<TestDescriptor> resolvedDescriptors) |
private void |
JavaElementsResolver.logMultipleTestDescriptorsForSingleElement(java.lang.reflect.AnnotatedElement element,
java.util.Set<TestDescriptor> descriptors) |
private java.util.Set<TestDescriptor> |
JavaElementsResolver.resolveContainerWithChildren(java.lang.Class<?> containerClass,
java.util.Set<TestDescriptor> potentialParents) |
private java.util.Set<TestDescriptor> |
JavaElementsResolver.resolveForAllParents(java.lang.reflect.AnnotatedElement element,
java.util.Set<TestDescriptor> potentialParents) |
Constructor and Description |
---|
JavaElementsResolver(TestDescriptor engineDescriptor,
JupiterConfiguration configuration,
ClassFilter classFilter,
java.util.Set<ElementResolver> resolvers) |
Modifier and Type | Field and Description |
---|---|
private TestDescriptor |
ExecutionRequest.rootTestDescriptor |
Modifier and Type | Method and Description |
---|---|
TestDescriptor |
TestEngine.discover(EngineDiscoveryRequest discoveryRequest,
UniqueId uniqueId)
Discover tests according to the supplied
EngineDiscoveryRequest . |
TestDescriptor |
ExecutionRequest.getRootTestDescriptor()
Get the root
TestDescriptor of the engine that processes this
request. |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<? extends TestDescriptor> |
TestDescriptor.findByUniqueId(UniqueId uniqueId)
Find the descriptor with the supplied unique ID.
|
java.util.Set<? extends TestDescriptor> |
TestDescriptor.getChildren()
Get the immutable set of children of this descriptor.
|
default java.util.Set<? extends TestDescriptor> |
TestDescriptor.getDescendants()
Get the immutable set of all descendants of this descriptor.
|
java.util.Optional<TestDescriptor> |
TestDescriptor.getParent()
Get the parent of this descriptor, if available.
|
Modifier and Type | Method and Description |
---|---|
void |
TestDescriptor.addChild(TestDescriptor descriptor)
Add a child to this descriptor.
|
static boolean |
TestDescriptor.containsTests(TestDescriptor testDescriptor)
Determine if the supplied descriptor (or any of its descendants)
is a test or
may potentially register
tests dynamically.
|
void |
EngineExecutionListener.dynamicTestRegistered(TestDescriptor testDescriptor)
Must be called when a new, dynamic
TestDescriptor has been
registered. |
void |
EngineExecutionListener.executionFinished(TestDescriptor testDescriptor,
TestExecutionResult testExecutionResult)
Must be called when the execution of a leaf or subtree of the test tree
has finished, regardless of the outcome.
|
void |
EngineExecutionListener.executionSkipped(TestDescriptor testDescriptor,
java.lang.String reason)
Must be called when the execution of a leaf or subtree of the test tree
has been skipped.
|
void |
EngineExecutionListener.executionStarted(TestDescriptor testDescriptor)
Must be called when the execution of a leaf or subtree of the test tree
is about to be started.
|
void |
TestDescriptor.removeChild(TestDescriptor descriptor)
Remove a child from this descriptor.
|
void |
EngineExecutionListener.reportingEntryPublished(TestDescriptor testDescriptor,
ReportEntry entry)
Can be called for any
TestDescriptor in order to publish additional
information to the reporting infrastructure — for example:
Output that would otherwise go to System.out
Information about test context or test data
|
void |
TestDescriptor.setParent(TestDescriptor parent)
Set the parent of this descriptor.
|
void |
TestDescriptor.Visitor.visit(TestDescriptor descriptor)
Visit a
TestDescriptor . |
Constructor and Description |
---|
ExecutionRequest(TestDescriptor rootTestDescriptor,
EngineExecutionListener engineExecutionListener,
ConfigurationParameters configurationParameters) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractTestDescriptor
Abstract base implementation of
TestDescriptor that may be used by
custom TestEngines . |
class |
EngineDescriptor
|
Modifier and Type | Field and Description |
---|---|
private TestDescriptor |
AbstractTestDescriptor.parent |
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<TestDescriptor> |
AbstractTestDescriptor.children
The synchronized set of children associated with this
TestDescriptor . |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<? extends TestDescriptor> |
AbstractTestDescriptor.findByUniqueId(UniqueId uniqueId) |
java.util.Set<? extends TestDescriptor> |
AbstractTestDescriptor.getChildren() |
java.util.Optional<TestDescriptor> |
AbstractTestDescriptor.getParent() |
Modifier and Type | Method and Description |
---|---|
void |
AbstractTestDescriptor.addChild(TestDescriptor child) |
void |
AbstractTestDescriptor.removeChild(TestDescriptor child) |
void |
AbstractTestDescriptor.setParent(TestDescriptor parent) |
Modifier and Type | Field and Description |
---|---|
private TestDescriptor |
NodeTestTask.testDescriptor |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<TestDescriptor,Node.ExecutionMode> |
NodeExecutionAdvisor.forcedDescendantExecutionModeByTestDescriptor |
private java.util.Map<TestDescriptor,ResourceLock> |
NodeExecutionAdvisor.resourceLocksByTestDescriptor |
Modifier and Type | Method and Description |
---|---|
(package private) static <C extends EngineExecutionContext> |
NodeUtils.asNode(TestDescriptor testDescriptor) |
private void |
NodeTreeWalker.doForChildrenRecursively(TestDescriptor parent,
java.util.function.Consumer<TestDescriptor> consumer) |
void |
NodeTestTask.DefaultDynamicTestExecutor.execute(TestDescriptor dynamicTestDescriptor) |
void |
Node.DynamicTestExecutor.execute(TestDescriptor testDescriptor)
Submit a dynamic test descriptor for immediate execution.
|
(package private) void |
NodeExecutionAdvisor.forceDescendantExecutionMode(TestDescriptor testDescriptor,
Node.ExecutionMode executionMode) |
private java.util.Set<ExclusiveResource> |
NodeTreeWalker.getExclusiveResources(TestDescriptor testDescriptor) |
(package private) java.util.Optional<Node.ExecutionMode> |
NodeExecutionAdvisor.getForcedExecutionMode(TestDescriptor testDescriptor) |
(package private) ResourceLock |
NodeExecutionAdvisor.getResourceLock(TestDescriptor testDescriptor) |
private java.util.Optional<Node.ExecutionMode> |
NodeExecutionAdvisor.lookupExecutionModeForcedByAncestor(TestDescriptor testDescriptor) |
default void |
Node.nodeFinished(C context,
TestDescriptor testDescriptor,
TestExecutionResult result)
Callback invoked when the execution of this node has finished.
|
default void |
Node.nodeSkipped(C context,
TestDescriptor testDescriptor,
Node.SkipResult result)
Callback invoked when the execution of this node has been skipped.
|
(package private) void |
NodeExecutionAdvisor.useResourceLock(TestDescriptor testDescriptor,
ResourceLock resourceLock) |
(package private) NodeExecutionAdvisor |
NodeTreeWalker.walk(TestDescriptor testDescriptor) |
private void |
NodeTreeWalker.walk(TestDescriptor testDescriptor,
NodeExecutionAdvisor advisor) |
Modifier and Type | Method and Description |
---|---|
private void |
NodeTreeWalker.doForChildrenRecursively(TestDescriptor parent,
java.util.function.Consumer<TestDescriptor> consumer) |
Constructor and Description |
---|
NodeTestTask(NodeTestTaskContext taskContext,
TestDescriptor testDescriptor) |
Modifier and Type | Method and Description |
---|---|
static TestIdentifier |
TestIdentifier.from(TestDescriptor testDescriptor)
Factory for creating a new
TestIdentifier from a TestDescriptor . |
Modifier and Type | Method and Description |
---|---|
static TestPlan |
TestPlan.from(java.util.Collection<TestDescriptor> engineDescriptors)
Construct a new
TestPlan from the supplied collection of
TestDescriptors . |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<TestEngine,TestDescriptor> |
Root.testEngineDescriptors |
Modifier and Type | Method and Description |
---|---|
(package private) TestDescriptor |
Root.getTestDescriptorFor(TestEngine testEngine) |
Modifier and Type | Method and Description |
---|---|
private java.util.Optional<TestDescriptor> |
DefaultLauncher.discoverEngineRoot(TestEngine testEngine,
LauncherDiscoveryRequest discoveryRequest) |
(package private) java.util.Collection<TestDescriptor> |
Root.getEngineDescriptors() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
Root.add(TestEngine engine,
TestDescriptor testDescriptor)
Add an
engine 's root TestDescriptor . |
void |
ExecutionListenerAdapter.dynamicTestRegistered(TestDescriptor testDescriptor) |
void |
ExecutionListenerAdapter.executionFinished(TestDescriptor testDescriptor,
TestExecutionResult testExecutionResult) |
void |
ExecutionListenerAdapter.executionSkipped(TestDescriptor testDescriptor,
java.lang.String reason) |
void |
ExecutionListenerAdapter.executionStarted(TestDescriptor testDescriptor) |
private TestIdentifier |
ExecutionListenerAdapter.getTestIdentifier(TestDescriptor testDescriptor) |
(package private) boolean |
EngineDiscoveryResultValidator.isAcyclic(TestDescriptor root) |
private boolean |
Root.isExcluded(TestDescriptor descriptor,
Filter<TestDescriptor> postDiscoveryFilter) |
void |
ExecutionListenerAdapter.reportingEntryPublished(TestDescriptor testDescriptor,
ReportEntry entry) |
(package private) void |
EngineDiscoveryResultValidator.validate(TestEngine testEngine,
TestDescriptor root)
Perform common validation checks.
|
Modifier and Type | Method and Description |
---|---|
private boolean |
Root.isExcluded(TestDescriptor descriptor,
Filter<TestDescriptor> postDiscoveryFilter) |
Modifier and Type | Method and Description |
---|---|
TestDescriptor |
VintageTestEngine.discover(EngineDiscoveryRequest discoveryRequest,
UniqueId uniqueId) |
Modifier and Type | Method and Description |
---|---|
private void |
VintageTestEngine.executeAllChildren(RunnerExecutor runnerExecutor,
TestDescriptor engineTestDescriptor) |
Modifier and Type | Class and Description |
---|---|
class |
RunnerTestDescriptor |
class |
VintageTestDescriptor |
Modifier and Type | Method and Description |
---|---|
TestDescriptor |
VintageDiscoverer.discover(EngineDiscoveryRequest discoveryRequest,
UniqueId uniqueId) |
Modifier and Type | Method and Description |
---|---|
private java.util.Set<org.junit.runner.Description> |
UniqueIdFilter.determineDescendants(java.util.Optional<? extends TestDescriptor> identifiedTestDescriptor) |
private java.util.Deque<org.junit.runner.Description> |
UniqueIdFilter.determinePath(RunnerTestDescriptor runnerTestDescriptor,
java.util.Optional<? extends TestDescriptor> identifiedTestDescriptor) |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<TestDescriptor,java.util.List<TestExecutionResult>> |
TestRun.executionResults |
private java.util.Set<TestDescriptor> |
TestRun.finishedDescriptors |
private java.util.Set<TestDescriptor> |
TestRun.runnerDescendants |
private java.util.Set<TestDescriptor> |
TestRun.skippedDescriptors |
private java.util.Set<TestDescriptor> |
TestRun.startedDescriptors |
Modifier and Type | Method and Description |
---|---|
private TestDescriptor |
RunListenerAdapter.findParent(org.junit.runner.Description description) |
private TestDescriptor |
RunListenerAdapter.lookupOrRegisterTestDescriptor(org.junit.runner.Description description) |
Modifier and Type | Method and Description |
---|---|
private boolean |
RunListenerAdapter.canFinish(TestDescriptor testDescriptor) |
private boolean |
RunListenerAdapter.canStart(TestDescriptor testDescriptor) |
private void |
RunListenerAdapter.dynamicTestRegistered(TestDescriptor testDescriptor) |
private void |
RunListenerAdapter.fireExecutionFinished(TestDescriptor testDescriptor) |
private void |
RunListenerAdapter.fireExecutionSkipped(TestDescriptor testDescriptor,
java.lang.String reason) |
private void |
RunListenerAdapter.fireExecutionStarted(TestDescriptor testDescriptor) |
private void |
RunListenerAdapter.fireMissingContainerEvents(TestDescriptor testDescriptor) |
(package private) TestExecutionResult |
TestRun.getStoredResultOrSuccessful(TestDescriptor testDescriptor) |
private void |
RunListenerAdapter.handleFailure(org.junit.runner.notification.Failure failure,
java.util.function.Function<java.lang.Throwable,TestExecutionResult> resultCreator,
TestDescriptor testDescriptor) |
(package private) boolean |
TestRun.isDescendantOfRunnerTestDescriptor(TestDescriptor testDescriptor) |
(package private) boolean |
TestRun.isFinished(TestDescriptor testDescriptor) |
(package private) boolean |
TestRun.isFinishedOrSkipped(TestDescriptor testDescriptor) |
(package private) boolean |
TestRun.isNotFinished(TestDescriptor testDescriptor) |
(package private) boolean |
TestRun.isNotSkipped(TestDescriptor testDescriptor) |
(package private) boolean |
TestRun.isNotStarted(TestDescriptor testDescriptor) |
(package private) boolean |
TestRun.isSkipped(TestDescriptor testDescriptor) |
(package private) void |
TestRun.markFinished(TestDescriptor testDescriptor) |
(package private) void |
TestRun.markSkipped(TestDescriptor testDescriptor) |
(package private) void |
TestRun.markStarted(TestDescriptor testDescriptor) |
(package private) void |
TestRun.storeResult(TestDescriptor testDescriptor,
TestExecutionResult result) |
private void |
RunListenerAdapter.testFinished(TestDescriptor descriptor) |
private void |
RunListenerAdapter.testIgnored(TestDescriptor testDescriptor,
java.lang.String reason) |
private void |
RunListenerAdapter.testStarted(TestDescriptor testDescriptor) |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
TestRun.areAllFinishedOrSkipped(java.util.Set<? extends TestDescriptor> testDescriptors) |
private void |
RunListenerAdapter.fireExecutionFinishedIncludingAncestorsWithoutPendingChildren(java.util.Optional<TestDescriptor> parent) |
private void |
RunListenerAdapter.fireExecutionStartedIncludingUnstartedAncestors(java.util.Optional<TestDescriptor> parent) |