Top Description Interfaces Annotations Classes
module org.junit.jupiter.api

Package org.junit.jupiter.api.extension


JUnit Jupiter API for writing extensions.

Interface Summary

Modifier and TypeInterface and Description
public interface
AfterAllCallback

AfterAllCallback defines the API for Extensions that wish to provide additional behavior to test containers once after all tests in the container have been executed.

public interface
AfterEachCallback

AfterEachCallback defines the API for Extensions 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.

public interface
AfterTestExecutionCallback

AfterTestExecutionCallback defines the API for Extensions 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.

public interface
AnnotatedElementContext

AnnotatedElementContext encapsulates the context in which an AnnotatedElement is declared.

public interface
BeforeAllCallback

BeforeAllCallback defines the API for Extensions that wish to provide additional behavior to test containers once before all tests in the container have been executed.

public interface
BeforeEachCallback

BeforeEachCallback defines the API for Extensions 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.

public interface
BeforeTestExecutionCallback

BeforeTestExecutionCallback defines the API for Extensions 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.

public interface
DynamicTestInvocationContext

DynamicTestInvocationContext represents the context of a single invocation of a dynamic test.

public interface
ExecutableInvoker

ExecutableInvoker allows invoking methods and constructors with support for dynamic resolution of parameters via ParameterResolvers.

public interface
ExecutionCondition

ExecutionCondition defines the Extension API for programmatic, conditional test execution.

public interface
Extension

Marker interface for all extensions.

public interface
ExtensionContext

ExtensionContext encapsulates the context in which the current test or container is being executed.

public interface
InvocationInterceptor

InvocationInterceptor defines the API for Extensions that wish to intercept calls to test code.

public interface
LifecycleMethodExecutionExceptionHandler

LifecycleMethodExecutionExceptionHandler defines the API for Extensions that wish to handle exceptions thrown during the execution of @BeforeAll, @BeforeEach, @AfterEach, and @AfterAll lifecycle methods.

public interface
ParameterContext

ParameterContext encapsulates the context in which an Executable will be invoked for a given Parameter.

public interface
ParameterResolver

ParameterResolver defines the API for Extensions that wish to dynamically resolve arguments for parameters at runtime.

public interface
ReflectiveInvocationContext<T extends Executable>

ReflectiveInvocationContext encapsulates the context of a reflective invocation of an executable (method or constructor).

public interface
TestExecutionExceptionHandler

TestExecutionExceptionHandler defines the API for Extensions that wish to handle exceptions thrown during test execution.

public interface
TestInstanceFactory

TestInstanceFactory defines the API for Extensions that wish to create test instances.

public interface
TestInstanceFactoryContext

TestInstanceFactoryContext encapsulates the context in which a test class is to be instantiated by a TestInstanceFactory.

public interface
TestInstancePostProcessor

TestInstancePostProcessor defines the API for Extensions that wish to post-process test instances.

public interface
TestInstancePreConstructCallback

TestInstancePreConstructCallback defines the API for Extensions that wish to be invoked prior to creation of test instances.

public interface
TestInstancePreDestroyCallback

TestInstancePreDestroyCallback defines the API for Extensions that wish to process test instances after they have been used in tests but before they are destroyed.

public interface
TestInstances

TestInstances encapsulates the test instances of a test.

public interface
TestTemplateInvocationContext

TestTemplateInvocationContext represents the context of a single invocation of a test template.

public interface
TestTemplateInvocationContextProvider

TestTemplateInvocationContextProvider defines the API for Extensions that wish to provide one or multiple contexts for the invocation of a @TestTemplate method.

public interface
TestWatcher

TestWatcher defines the API for Extensions that wish to process test results.

Annotation Summary

Modifier and TypeAnnotation and Description
public @interface
ExtendWith

@ExtendWith is a repeatable annotation that is used to register extensions for the annotated test class, test interface, test method, parameter, or field.

public @interface
Extensions

@Extensions is a container for one or more @ExtendWith declarations.

public @interface
RegisterExtension

@RegisterExtension is used to register an Extension via a field in a test class.

Class Summary

Modifier and TypeClass and Description
public class
ConditionEvaluationResult

The result of evaluating an ExecutionCondition.

public class
ExtensionConfigurationException

Thrown if an error is encountered regarding the configuration of an extension.

public class
ExtensionContextException

Thrown if an error is encountered regarding the use of an ExtensionContext or Store.

public class
ParameterResolutionException

Thrown if an error is encountered in the configuration or execution of a ParameterResolver.

public class
TestInstantiationException

Thrown if an error is encountered during the execution of a TestInstanceFactory.