Package org.junit.jupiter.api.extension
JUnit Jupiter API for writing extensions.
-
Interface Summary Interface Description AfterAllCallback AfterAllCallback
defines the API forExtensions
that wish to provide additional behavior to test containers after all tests have been invoked.AfterEachCallback AfterEachCallback
defines the API forExtensions
that wish to provide additional behavior to tests after each test method has been invoked.AfterTestExecutionCallback AfterTestExecutionCallback
defines the API forExtensions
that wish to provide additional behavior to tests immediately after each test has been executed.BeforeAllCallback BeforeAllCallback
defines the API forExtensions
that wish to provide additional behavior to test containers before all tests are invoked.BeforeEachCallback BeforeEachCallback
defines the API forExtensions
that wish to provide additional behavior to tests before each test is invoked.BeforeTestExecutionCallback BeforeTestExecutionCallback
defines the API forExtensions
that wish to provide additional behavior to tests immediately before each test is executed.ExecutionCondition ExecutionCondition
defines theExtension
API for programmatic, conditional test execution.Extension Marker interface for all extensions.ExtensionContext ExtensionContext
encapsulates the context in which the current test or container is being executed.ExtensionContext.Store Store
provides 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 enclosingStore
is closed.ParameterContext ParameterContext
encapsulates the context in which anExecutable
will be invoked for a givenParameter
.ParameterResolver ParameterResolver
defines the API forExtensions
that wish to dynamically resolve arguments for parameters at runtime.TestExecutionExceptionHandler TestExecutionExceptionHandler
defines the API forExtensions
that wish to handle exceptions thrown during test execution.TestInstancePostProcessor TestInstancePostProcessor
defines the API forExtensions
that wish to post-process test instances.TestTemplateInvocationContext TestTemplateInvocationContext
represents the context of a single invocation of a test template.TestTemplateInvocationContextProvider TestTemplateInvocationContextProvider
defines the API forExtensions
that wish to provide one or multiple contexts for the invocation of a@TestTemplate
method. -
Class Summary Class Description ConditionEvaluationResult The result of evaluating an ExecutionCondition.ExtensionContext.Namespace ANamespace
is 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 anExtensionContext
orExtensionContext.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
. -
Annotation Types Summary Annotation Type Description ExtendWith @ExtendWith
is a repeatable annotation that is used to register extensions for the annotated test class or test method.Extensions @Extensions
is a container for one or more@ExtendWith
declarations.RegisterExtension @RegisterExtension
is used to register anExtension
via a field in a test class.