@API(status=INTERNAL,
since="5.0")
public class TestMethodTestDescriptor
extends MethodBasedTestDescriptor
TestDescriptor for @Test methods.
The default display name for a test method is the name of the method
concatenated with a comma-separated list of parameter types in parentheses.
The names of parameter types are retrieved using Class.getSimpleName().
For example, the default display name for the following test method is
testUser(TestInfo, User).
@Test
void testUser(TestInfo testInfo, @Mock User user) { ... }
Node.DynamicTestExecutor, Node.ExecutionMode, Node.Invocation<C extends EngineExecutionContext>, Node.SkipResultTestDescriptor.Type, TestDescriptor.Visitorconfigurationchildren| Constructor and Description |
|---|
TestMethodTestDescriptor(UniqueId uniqueId,
Class<?> testClass,
Method testMethod,
JupiterConfiguration configuration) |
getExclusiveResources, getExplicitExecutionMode, getLegacyReportingName, getTags, getTestClass, getTestMethodcleanUp, executeAndMaskThrowable, getDefaultChildExecutionMode, getExclusiveResourcesFromAnnotation, getExecutionMode, getExecutionModeFromAnnotation, getTags, shouldBeSkipped, toExecutionModeaddChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitafter, around, beforeaccept, containsTests, getDescendants, isContainer, isRoot, isTest, mayRegisterTests, prunepublic TestMethodTestDescriptor(UniqueId uniqueId, Class<?> testClass, Method testMethod, JupiterConfiguration configuration)
public TestDescriptor.Type getType()
TestDescriptorTestDescriptor.Type of this descriptor.null.TestDescriptor.isContainer(),
TestDescriptor.isTest()public JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context) throws Exception
JupiterTestDescriptorprepare in interface Node<JupiterEngineExecutionContext>prepare in class JupiterTestDescriptorExceptionNode.cleanUp(EngineExecutionContext)protected ExtensionRegistry populateNewExtensionRegistry(JupiterEngineExecutionContext context)
public JupiterEngineExecutionContext execute(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor) throws Exception
NodeContainers typically do not implement this method since the
HierarchicalTestEngine handles execution of their children.
The supplied dynamicTestExecutor may be used to submit
additional dynamic tests for immediate execution.
The default implementation returns the supplied context unmodified.
context - the context to execute indynamicTestExecutor - the executor to submit dynamic tests toExceptionNode.before(C),
Node.after(C)protected void invokeTestMethod(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor)
public void nodeSkipped(JupiterEngineExecutionContext context, TestDescriptor descriptor, Node.SkipResult result)
TestWatcher.testDisabled(ExtensionContext, Optional) on each
registered TestWatcher, in registration order.context - the execution contextdescriptor - the test descriptor that was skippedresult - the result of skipped executionpublic void nodeFinished(JupiterEngineExecutionContext context, TestDescriptor descriptor, TestExecutionResult result)
testSuccessful(),
testAborted(), or
testFailed() on each
registered TestWatcher according to the status of the supplied
TestExecutionResult, in reverse registration order.context - the execution contextdescriptor - the test descriptor that was executedresult - the result of the executionCopyright © 2024. All rights reserved.