Module org.junit.jupiter.api
Package org.junit.jupiter.api.extension
package org.junit.jupiter.api.extension
JUnit Jupiter API for writing extensions.
-
ClassDescription
AfterAllCallback
defines the API forExtensions
that wish to provide additional behavior to test containers once after all tests in the container have been executed.AfterEachCallback
defines the API forExtensions
that wish to provide additional behavior to tests after an individual test and any user-defined teardown methods (e.g.,@AfterEach
methods) for that test have been executed.AfterTestExecutionCallback
defines the API forExtensions
that wish to provide additional behavior to tests immediately after an individual test has been executed but before any user-defined teardown methods (e.g.,@AfterEach
methods) have been executed for that test.AnnotatedElementContext
encapsulates the context in which anAnnotatedElement
is declared.BeforeAllCallback
defines the API forExtensions
that wish to provide additional behavior to test containers once before all tests in the container have been executed.BeforeEachCallback
defines the API forExtensions
that wish to provide additional behavior to tests before an individual test and any user-defined setup methods (e.g.,@BeforeEach
methods) for that test have been executed.BeforeTestExecutionCallback
defines the API forExtensions
that wish to provide additional behavior to tests immediately before an individual test is executed but after any user-defined setup methods (e.g.,@BeforeEach
methods) have been executed for that test.The result of evaluating anExecutionCondition
.DynamicTestInvocationContext
represents the context of a single invocation of a dynamic test.ExecutableInvoker
allows invoking methods and constructors with support for dynamic resolution of parameters viaParameterResolvers
.ExecutionCondition
defines theExtension
API for programmatic, conditional test execution.@ExtendWith
is a repeatable annotation that is used to register extensions for the annotated test class, test interface, test method, parameter, or field.Marker interface for all extensions.Thrown if an error is encountered regarding the configuration of an extension.ExtensionContext
encapsulates the context in which the current test or container is being executed.ANamespace
is used to provide a scope for data saved by extensions within aExtensionContext.Store
.Store
provides methods for extensions to save and retrieve data.Classes implementing this interface indicate that they want toExtensionContext.Store.CloseableResource.close()
some underlying resource or resources when the enclosingStore
is closed.Thrown if an error is encountered regarding the use of anExtensionContext
orExtensionContext.Store
.@Extensions
is a container for one or more@ExtendWith
declarations.InvocationInterceptor
defines the API forExtensions
that wish to intercept calls to test code.An invocation that returns a result and may throw aThrowable
.LifecycleMethodExecutionExceptionHandler
defines the API forExtensions
that wish to handle exceptions thrown during the execution of@BeforeAll
,@BeforeEach
,@AfterEach
, and@AfterAll
lifecycle methods.ParameterContext
encapsulates the context in which anExecutable
will be invoked for a givenParameter
.Thrown if an error is encountered in the configuration or execution of aParameterResolver
.ParameterResolver
defines the API forExtensions
that wish to dynamically resolve arguments for parameters at runtime.ReflectiveInvocationContext<T extends Executable>ReflectiveInvocationContext
encapsulates the context of a reflective invocation of an executable (method or constructor).@RegisterExtension
is used to register anExtension
via a field in a test class.TestExecutionExceptionHandler
defines the API forExtensions
that wish to handle exceptions thrown during test execution.TestInstanceFactoryContext
encapsulates the context in which a test class is to be instantiated by aTestInstanceFactory
.TestInstancePostProcessor
defines the API forExtensions
that wish to post-process test instances.TestInstancePreConstructCallback
defines the API forExtensions
that wish to be invoked prior to creation of test instances.TestInstancePreDestroyCallback
defines the API forExtensions
that wish to process test instances after they have been used in tests but before they are destroyed.TestInstances
encapsulates the test instances of a test.Thrown if an error is encountered during the execution of aTestInstanceFactory
.TestTemplateInvocationContext
represents the context of a single invocation of a test template.TestTemplateInvocationContextProvider
defines the API forExtensions
that wish to provide one or multiple contexts for the invocation of a@TestTemplate
method.TestWatcher
defines the API forExtensions
that wish to process test results.