See: Description
| Interface | Description |
|---|---|
| ActiveProfilesResolver |
Strategy interface for programmatically resolving which active bean
definition profiles should be used when loading an
ApplicationContext
for a test class. |
| BootstrapContext |
BootstrapContext encapsulates the context in which the Spring
TestContext Framework is bootstrapped. |
| CacheAwareContextLoaderDelegate |
A
CacheAwareContextLoaderDelegate is responsible for loading and closing application
contexts, interacting transparently with a
ContextCache
behind the scenes. |
| ContextCustomizer |
Strategy interface for customizing
application contexts that are created and managed by the Spring
TestContext Framework. |
| ContextCustomizerFactory |
Factory for creating
ContextCustomizers. |
| ContextLoader |
Strategy interface for loading an
application context
for an integration test managed by the Spring TestContext Framework. |
| DynamicPropertyRegistry |
Registry used with
@DynamicPropertySource
methods so that they can add properties to the Environment that have
dynamically resolved values. |
| SmartContextLoader |
Strategy interface for loading an
application context
for an integration test managed by the Spring TestContext Framework. |
| TestContext |
TestContext encapsulates the context in which a test is executed,
agnostic of the actual testing framework in use. |
| TestContextBootstrapper |
TestContextBootstrapper defines the SPI for bootstrapping the
Spring TestContext Framework. |
| TestExecutionListener |
TestExecutionListener defines a listener API for reacting to
test execution events published by the TestContextManager with which
the listener is registered. |
| Class | Description |
|---|---|
| ContextConfigurationAttributes |
ContextConfigurationAttributes encapsulates the context configuration
attributes declared via @ContextConfiguration. |
| MergedContextConfiguration |
MergedContextConfiguration encapsulates the merged
context configuration declared on a test class and all of its superclasses
via @ContextConfiguration,
@ActiveProfiles, and
@TestPropertySource. |
| TestContextAnnotationUtils |
TestContextAnnotationUtils is a collection of utility methods that
complements the standard support already available in AnnotationUtils
and AnnotatedElementUtils, while transparently honoring
@NestedTestConfiguration semantics. |
| TestContextAnnotationUtils.AnnotationDescriptor<T extends Annotation> |
Descriptor for an
Annotation, including the class on which the annotation is declared
as well as the merged annotation instance. |
| TestContextAnnotationUtils.UntypedAnnotationDescriptor |
Untyped extension of
TestContextAnnotationUtils.AnnotationDescriptor that is used
to describe the declaration of one of several candidate annotation types
where the actual annotation type cannot be predetermined. |
| TestContextManager |
TestContextManager is the main entry point into the Spring
TestContext Framework. |
| Enum | Description |
|---|---|
| NestedTestConfiguration.EnclosingConfiguration |
Enumeration of modes that dictate how test configuration from
enclosing classes is processed for inner test classes.
|
| TestConstructor.AutowireMode |
Defines autowiring modes for parameters in a test constructor.
|
| TestExecutionListeners.MergeMode |
Enumeration of modes that dictate whether or not explicitly
declared listeners are merged with the default listeners when
@TestExecutionListeners is declared on a class that does
not inherit listeners from a superclass. |
| Annotation Type | Description |
|---|---|
| ActiveProfiles |
ActiveProfiles is a class-level annotation that is used to declare
which active bean definition profiles should be used when loading
an ApplicationContext
for test classes. |
| BootstrapWith |
@BootstrapWith defines class-level metadata that is used to determine
how to bootstrap the Spring TestContext Framework. |
| ContextConfiguration |
@ContextConfiguration defines class-level metadata that is used to determine
how to load and configure an ApplicationContext for integration tests. |
| ContextHierarchy |
@ContextHierarchy is a class-level annotation that is used to define
a hierarchy of ApplicationContexts for integration tests. |
| DynamicPropertySource |
Method-level annotation for integration tests that need to add properties with
dynamic values to the
Environment's set of PropertySources. |
| NestedTestConfiguration |
@NestedTestConfiguration is a type-level annotation that is used to
configure how Spring test configuration annotations are processed within
enclosing class hierarchies (i.e., for inner test classes). |
| TestConstructor |
@TestConstructor is a type-level annotation that is used to configure
how the parameters of a test class constructor are autowired from components
in the test's ApplicationContext. |
| TestExecutionListeners |
TestExecutionListeners defines class-level metadata for configuring
which TestExecutionListeners should be
registered with a TestContextManager. |
| TestPropertySource |
@TestPropertySource is a class-level annotation that is used to
configure the TestPropertySource.locations() of properties files and inlined
TestPropertySource.properties() to be added to the Environment's set of
PropertySources for an
ApplicationContext
for integration tests. |
| TestPropertySources |
@TestPropertySources is a container for one or more
@TestPropertySource declarations. |
In addition to providing generic and extensible testing infrastructure, the Spring TestContext Framework provides out-of-the-box support for Spring-specific integration testing functionality such as context management and caching, dependency injection of test fixtures, and transactional test management with default rollback semantics.