Package org.junit.jupiter.api.extension
JUnit Jupiter API for writing extensions.
-
Interface Summary Interface Description AfterAllCallback AfterAllCallbackdefines the API forExtensionsthat wish to provide additional behavior to test containers after all tests have been invoked.AfterEachCallback AfterEachCallbackdefines the API forExtensionsthat wish to provide additional behavior to tests after each test method has been invoked.AfterTestExecutionCallback AfterTestExecutionCallbackdefines the API forExtensionsthat wish to provide additional behavior to tests immediately after each test has been executed.BeforeAllCallback BeforeAllCallbackdefines the API forExtensionsthat wish to provide additional behavior to test containers before all tests are invoked.BeforeEachCallback BeforeEachCallbackdefines the API forExtensionsthat wish to provide additional behavior to tests before each test is invoked.BeforeTestExecutionCallback BeforeTestExecutionCallbackdefines the API forExtensionsthat wish to provide additional behavior to tests immediately before each test is executed.ExecutionCondition ExecutionConditiondefines theExtensionAPI for programmatic, conditional test execution.Extension Marker interface for all extensions.ExtensionContext ExtensionContextencapsulates the context in which the current test or container is being executed.ExtensionContext.Store Storeprovides methods for extensions to save and retrieve data.ExtensionContext.Store.CloseableResource Classes implementing this interface indicate that they want toExtensionContext.Store.CloseableResource.close()some underlying resource or resources when the enclosingStoreis closed.ParameterContext ParameterContextencapsulates the context in which anExecutablewill be invoked for a givenParameter.ParameterResolver ParameterResolverdefines the API forExtensionsthat wish to dynamically resolve arguments for parameters at runtime.TestExecutionExceptionHandler TestExecutionExceptionHandlerdefines the API forExtensionsthat wish to handle exceptions thrown during test execution.TestInstanceFactory TestInstanceFactoryContext TestInstanceFactoryContextencapsulates the context in which a test class is to be instantiated by aTestInstanceFactory.TestInstancePostProcessor TestInstancePostProcessordefines the API forExtensionsthat wish to post-process test instances.TestTemplateInvocationContext TestTemplateInvocationContextrepresents the context of a single invocation of a test template.TestTemplateInvocationContextProvider TestTemplateInvocationContextProviderdefines the API forExtensionsthat wish to provide one or multiple contexts for the invocation of a@TestTemplatemethod. -
Class Summary Class Description ConditionEvaluationResult The result of evaluating an ExecutionCondition.ExtensionContext.Namespace ANamespaceis used to provide a scope for data saved by extensions within aExtensionContext.Store. -
Exception Summary Exception Description ExtensionConfigurationException Thrown if an error is encountered regarding the configuration of an extension.ExtensionContextException Thrown if an error is encountered regarding the use of anExtensionContextorExtensionContext.Store.ParameterResolutionException Thrown if an error is encountered in the configuration or execution of aParameterResolver.ScriptEvaluationException Thrown if an error is encountered while evaluating a script-basedExecutionCondition.TestInstantiationException Thrown if an error is encountered during the execution of aTestInstanceFactory. -
Annotation Types Summary Annotation Type Description ExtendWith @ExtendWithis a repeatable annotation that is used to register extensions for the annotated test class or test method.Extensions @Extensionsis a container for one or more@ExtendWithdeclarations.RegisterExtension @RegisterExtensionis used to register anExtensionvia a field in a test class.