All Classes and Interfaces
Class
Description
AssertJ
assertions
that can be applied to
BindingResult
.Abstract application context loader that provides a basis for all concrete
implementations of the
ContextLoader
SPI.AbstractDelegatingSmartContextLoader
serves as an abstract base class
for implementations of the SmartContextLoader
SPI that delegate to a
set of candidate SmartContextLoaders (i.e., one that supports XML
configuration files or Groovy scripts and one that supports annotated classes)
to determine which context loader is appropriate for a given test class's
configuration.Abstract base class for
TestExecutionListener
implementations that
provide support for marking the ApplicationContext
associated with
a test as dirty for both test classes and test methods annotated
with the @DirtiesContext
annotation.Abstract, generic extension of
AbstractContextLoader
that loads a
GenericApplicationContext
.Abstract, generic extension of
AbstractContextLoader
that loads a
GenericWebApplicationContext
.AbstractHttpServletRequestAssert<SELF extends AbstractHttpServletRequestAssert<SELF,ACTUAL>,ACTUAL extends HttpServletRequest>
Base AssertJ assertions that can be
applied to an
HttpServletRequest
.AbstractHttpServletResponseAssert<R extends HttpServletResponse,SELF extends AbstractHttpServletResponseAssert<R,SELF,ACTUAL>,ACTUAL>
Base AssertJ assertions that can be
applied to any object that provides an
HttpServletResponse
.Base AssertJ assertions that can be
applied to a JSON document.
Base AssertJ assertions that can be
applied to a JSON value.
Abstract base test class which integrates the Spring TestContext
Framework with explicit
ApplicationContext
testing support
in a JUnit 4 environment.AssertJ assertions that can be applied
to
MockHttpServletRequest
.Base builder for
MockHttpServletRequest
required as input to
perform requests in MockMvc
.AbstractMockHttpServletResponseAssert<SELF extends AbstractMockHttpServletResponseAssert<SELF,ACTUAL>,ACTUAL>
Extension of
AbstractHttpServletResponseAssert
for
MockHttpServletResponse
.AbstractMockMultipartHttpServletRequestBuilder<B extends AbstractMockMultipartHttpServletRequestBuilder<B>>
Base builder for
MockMultipartHttpServletRequest
.Abstract implementation of
MockMvcBuilder
with common methods for
configuring filters, default request properties, global expectations and
global result actions.Base class for
RequestExpectationManager
implementations responsible
for storing expectations and actual requests, and checking for unsatisfied
expectations at the end.Helper class to manage a group of remaining expectations.
Abstract implementation of the
TestContextBootstrapper
interface which
provides most of the behavior required by a bootstrapper.Abstract ordered implementation of the
TestExecutionListener
API.Abstract base test class which integrates the Spring TestContext Framework
with explicit
ApplicationContext
testing support in a TestNG
environment.Abstract transactional extension of
AbstractJUnit4SpringContextTests
which adds convenience functionality
for JDBC access.Abstract transactional extension of
AbstractTestNGSpringContextTests
which adds convenience functionality
for JDBC access.ActiveProfiles
is an annotation that can be applied to a test class
to declare which active bean definition profiles should be used when
loading an ApplicationContext
for integration tests.Strategy interface for programmatically resolving which active bean
definition profiles should be used when loading an
ApplicationContext
for a test class.@EventListener
annotation used to consume an
AfterTestClassEvent
published by the
EventPublishingTestExecutionListener
.TestContextEvent
published by the EventPublishingTestExecutionListener
when
TestExecutionListener.afterTestClass(TestContext)
is invoked.@EventListener
annotation used to consume an
AfterTestExecutionEvent
published by the
EventPublishingTestExecutionListener
.TestContextEvent
published by the EventPublishingTestExecutionListener
when
TestExecutionListener.afterTestExecution(TestContext)
is invoked.@EventListener
annotation used to consume an
AfterTestMethodEvent
published by the
EventPublishingTestExecutionListener
.TestContextEvent
published by the EventPublishingTestExecutionListener
when
TestExecutionListener.afterTestMethod(TestContext)
is invoked.Test annotation which indicates that the annotated
void
method
should be executed after a transaction is ended for a test method
configured to run within a transaction via Spring's @Transactional
annotation.Concrete implementation of
AbstractGenericContextLoader
that loads
bean definitions from component classes.Utility methods for
SmartContextLoaders
that deal
with component classes (for example, @Configuration
classes).Concrete implementation of
AbstractGenericWebContextLoader
that loads
bean definitions from annotated classes.AopTestUtils
is a collection of AOP-related utility methods for
use in unit and integration testing scenarios.Strategy interface for loading an
ApplicationContext
for build-time
AOT processing as well as run-time
AOT execution for an integration test
managed by the Spring TestContext Framework.Holder for metadata specific to ahead-of-time (AOT) support in the Spring
TestContext Framework.
AotTestContextInitializers
provides mappings from test classes to
AOT-optimized context initializers.AotTestExecutionListener
is an extension of the TestExecutionListener
SPI that allows a listener to optionally provide ahead-of-time (AOT) support.Strategy for components that process failures related to application contexts
within the Spring TestContext Framework.
ApplicationEvents
encapsulates all application events that were fired during the execution of a single test method.Holder class to expose the application events published during the execution
of a test in the form of a thread-bound
ApplicationEvents
object.TestExecutionListener
which provides support for ApplicationEvents
.Test assertions that are independent of any third-party assertion library.
Mark a composed annotation as eligible for Bean Override processing.
Handler for Bean Override injection points that is responsible for creating
the bean override instance for a given set of metadata and potentially for
tracking the created instance.
Strategy interface for Bean Override processing, which creates a
BeanOverrideHandler
that drives how the target bean is overridden.Strategies for bean override processing.
TestExecutionListener
that enables @BeanOverride
support in tests, by injecting overridden beans in appropriate fields of the
test instance.@EventListener
annotation used to consume a
BeforeTestClassEvent
published by the
EventPublishingTestExecutionListener
.TestContextEvent
published by the EventPublishingTestExecutionListener
when
TestExecutionListener.beforeTestClass(TestContext)
is invoked.@EventListener
annotation used to consume a
BeforeTestExecution
published by the
EventPublishingTestExecutionListener
.TestContextEvent
published by the EventPublishingTestExecutionListener
when
TestExecutionListener.beforeTestExecution(TestContext)
is invoked.@EventListener
annotation used to consume a
BeforeTestMethodEvent
published by the
EventPublishingTestExecutionListener
.TestContextEvent
published by the EventPublishingTestExecutionListener
when
TestExecutionListener.beforeTestMethod(TestContext)
is invoked.Test annotation which indicates that the annotated
void
method
should be executed before a transaction is started for a test method
configured to run within a transaction via Spring's @Transactional
annotation.BootstrapContext
encapsulates the context in which the Spring
TestContext Framework is bootstrapped.BootstrapUtils
is a collection of utility methods to assist with
bootstrapping the Spring TestContext Framework.@BootstrapWith
is an annotation that can be applied to a test class
to define metadata that is used to determine how to bootstrap the
Spring TestContext Framework.A
CacheAwareContextLoaderDelegate
is responsible for loading and closing application
contexts, interacting transparently with a
ContextCache
behind the scenes.@Commit
is a test annotation that is used to indicate that a
test-managed transaction should be committed after
the test method has completed.TestExecutionListener
which makes sure that common caches are cleared
once they are no longer required.Defines common methods for building a
MockMvc
.An extension of
SmartRequestBuilder
that can be configured with RequestPostProcessors
.Factory for request content
RequestMatcher
's.Factory for response content assertions.
ContextCache
defines the SPI for caching Spring
ApplicationContexts
within the
Spring TestContext Framework.Collection of utilities for working with context caching.
@ContextConfiguration
is an annotation that can be applied to a test
class to define metadata that is used to determine how to load and configure
an ApplicationContext
for integration tests.ContextConfigurationAttributes
encapsulates the context configuration
attributes declared via @ContextConfiguration
.Strategy interface for customizing
application contexts
that are created and managed by the Spring
TestContext Framework.@ContextCustomizerFactories
is an annotation that can be applied to a
test class to configure which ContextCustomizerFactory
implementations
should be registered with the Spring TestContext Framework.Enumeration of modes that dictate whether explicitly declared
factories are merged with the default factories when
@ContextCustomizerFactories
is declared on a class that does
not inherit factories from a superclass or enclosing
class.Factory for creating
ContextCustomizers
.@ContextHierarchy
is an annotation that can be applied to a test class
to define a hierarchy of ApplicationContexts
for integration tests.Strategy interface for loading an
ApplicationContext
for an integration
test managed by the Spring TestContext Framework.Exception thrown when an error occurs while a
SmartContextLoader
attempts to load an ApplicationContext
.Assertions on cookies of the response.
AssertJ assertions that can be applied
to
cookies
.Factory for response cookie assertions.
Default implementation of the
ActiveProfilesResolver
strategy that
resolves active bean definition profiles based solely on profiles
configured declaratively via ActiveProfiles.profiles()
or
ActiveProfiles.value()
.Default implementation of the
BootstrapContext
interface.Default implementation of the
CacheAwareContextLoaderDelegate
strategy.Default implementation of the
ContextCache
API.A concrete implementation of
AbstractMockMvcBuilder
that provides
the WebApplicationContext
supplied to it as a constructor argument.Default implementation of
RequestExpectation
that simply delegates
to the request matchers and the response creator it contains.Helper class that keeps track of actual vs expected request count.
A
ResponseCreator
with builder-style methods for adding response details.Default implementation of the
TestContext
interface.Default implementation of the
TestContextBootstrapper
SPI.Delegating implementation of
ServletInputStream
.Delegating implementation of
ServletOutputStream
.DelegatingSmartContextLoader
is a concrete implementation of
AbstractDelegatingSmartContextLoader
that delegates to a
GenericXmlContextLoader
(or a GenericGroovyXmlContextLoader
if Groovy
is present in the classpath) and an AnnotationConfigContextLoader
.Implementation of
WebConnection
that allows delegating to various
WebConnection
implementations.The delegate web connection.
TestExecutionListener
which provides support for dependency
injection and initialization of test instances.Test annotation which indicates that the
ApplicationContext
associated with a test is dirty and should therefore be closed
and removed from the context cache.Defines modes which determine how
@DirtiesContext
is
interpreted when used to annotate a test class.Defines modes which determine how the context cache is cleared
when
@DirtiesContext
is used in a test whose context is
configured as part of a hierarchy via
@ContextHierarchy
.Defines modes which determine how
@DirtiesContext
is
interpreted when used to annotate a test method.TestExecutionListener
which provides support for marking the
ApplicationContext
associated with a test as dirty for
both test classes and test methods annotated with the
@DirtiesContext
annotation.TestExecutionListener
which provides support for marking the
ApplicationContext
associated with a test as dirty for
both test classes and test methods annotated with the
@DirtiesContext
annotation.@DisabledIf
is used to signal that the annotated test class or test
method is disabled and should not be executed if the supplied
DisabledIf.expression()
evaluates to true
.DisabledIfCondition
is an ExecutionCondition
that supports the @DisabledIf
annotation when using the Spring
TestContext Framework in conjunction with JUnit 5's Jupiter programming model.@DisabledInAotMode
signals that the annotated test class is disabled
in Spring AOT (ahead-of-time) mode, which means that the ApplicationContext
for the test class will not be processed for AOT optimizations at build time.Strategy interface for customizing
DispatcherServlet
instances that are
managed by MockMvc
.Registrar that is used to add properties with dynamically resolved values to
the
Environment
via a DynamicPropertyRegistry
.BeanFactoryInitializer
that eagerly initializes DynamicPropertyRegistrar
beans.Registry that is used to add properties with dynamically resolved values to
the
Environment
.@DynamicPropertySource
is an annotation that can be applied to static
methods in integration test classes in order to add properties with dynamic
values to the Environment
's set of PropertySources
.@EnabledIf
is used to signal that the annotated test class or test
method is enabled and should be executed if the supplied
EnabledIf.expression()
evaluates to true
.EnabledIfCondition
is an ExecutionCondition
that supports the @EnabledIf
annotation when using the Spring
TestContext Framework in conjunction with JUnit 5's Jupiter programming model.ExchangeResult
sub-class that exposes the response body fully
extracted to a representation of type <T>
.TestExecutionListener
that publishes test execution events to the
ApplicationContext
for the currently executing test.ExceptionCollector
is a test utility for executing code blocks,
collecting exceptions, and generating a single AssertionError
containing any exceptions encountered as suppressed exceptions.Executable
is a functional interface that can be used to implement
any generic block of code that potentially throws a Throwable
.Container for request and response details for exchanges performed through
WebTestClient
.ResponseCreator
that obtains the response by executing the request
through a ClientHttpRequestFactory
.A simple type representing a range for an expected count.
Factory for "output" flash attribute assertions.
ExchangeResult
variant with the response body decoded as
Flux<T>
but not yet consumed.Concrete implementation of
AbstractGenericContextLoader
that reads
bean definitions from Groovy scripts and XML configuration files.Concrete implementation of
AbstractGenericWebContextLoader
that loads
bean definitions from Groovy scripts and XML configuration files.Concrete implementation of
AbstractGenericContextLoader
that reads
bean definitions from XML resources.Concrete implementation of
AbstractGenericWebContextLoader
that loads
bean definitions from XML resources.AssertJ assertions that can be applied
to a handler or handler method.
Factory for assertions on the selected handler or handler method.
Assertions on headers of the response.
Factory for response header assertions.
A
WebRequestMatcher
that allows matching on the host and optionally
the port of WebRequest#getUrl()
.Connector that handles requests by invoking an
HttpHandler
rather
than making actual requests to a network socket.Indicates that an error occurred after the server response was completed,
via
ReactiveHttpOutputMessage.writeWith(org.reactivestreams.Publisher<? extends org.springframework.core.io.buffer.DataBuffer>)
or ReactiveHttpOutputMessage.setComplete()
,
and can no longer be changed.AssertJ
assertions
that can be applied to
HttpHeaders
.Convert HTTP message content for testing purposes.
Test annotation for use with JUnit 4 to indicate whether the annotated test
class or test method is enabled or disabled for a specific testing profile.
JdbcTestUtils
is a collection of JDBC related utility functions
intended to simplify standard database testing scenarios.Useful methods that can be used with
org.skyscreamer.jsonassert
.Strategy interface used to compare JSON strings.
Modes that can be used to compare JSON.
A comparison of two JSON strings as returned from a
JsonComparator
.Comparison results.
Default
AbstractJsonContentAssert
implementation.Deprecated.
JsonPath assertions.
A helper class for applying assertions via JSON path expressions.
Factory for assertions on the request content using
JsonPath expressions.
Factory for assertions on the response content using
JsonPath expressions.
AssertJ assertions that can be applied
to a JSON value produced by evaluating a JSON path
expression.
AssertJ
assertions
that can be applied
to a MediaType
.MergedContextConfiguration
encapsulates the merged context
configuration declared on a test class and all of its superclasses and
enclosing classes via @ContextConfiguration
,
@ActiveProfiles
, and
@TestPropertySource
.AssertJ
assertions
that can be applied
to a Method
.MethodInvoker
defines a generic API for invoking a Method
within the Spring TestContext Framework.Mock implementation of the
AsyncContext
interface.Mock implementation of the
BodyContent
class.Mock implementation of
ClientHttpRequest
.Mock implementation of
ClientHttpRequest
.Mock implementation of
ClientHttpResponse
.Mock implementation of
ClientHttpResponse
.Extension of
Cookie
with extra attributes, as defined in
RFC 6265.Simple
ConfigurableEnvironment
implementation exposing
MockEnvironment.setProperty(java.lang.String, java.lang.String)
and MockEnvironment.withProperty(java.lang.String, java.lang.String)
methods for testing purposes.Mock implementation of the
FilterChain
interface.Mock implementation of the
FilterConfig
interface.Mock implementation of
FilterRegistration
.Mock implementation of
HttpInputMessage
.Mock implementation of
HttpOutputMessage
.Mock implementation of
HttpServletMapping
.Mock implementation of the
HttpServletRequest
interface.Default builder for
MockHttpServletRequest
required as input to
perform requests in MockMvc
.Mock implementation of the
HttpServletResponse
interface.Mock implementation of the
HttpSession
interface.@MockitoBean
is an annotation that can be applied to a field in a test
class to override a bean in the test's
ApplicationContext
using a Mockito mock.TestExecutionListener
that resets any mock beans that have been marked
with a MockReset
.Mark a field to trigger a bean override using a Mockito spy, which will wrap
the original bean instance.
Mock implementation of the
JspWriter
class.Mock implementation of the
MultipartFile
interface.Mock implementation of the
MultipartHttpServletRequest
interface.Default builder for
MockMultipartHttpServletRequest
.Main entry point for server-side Spring MVC test support.
Builds a
MockMvc
instance.The main class to import in order to access all available
MockMvcBuilders
.Base class for MockMvc builder implementations, providing the capability to
create a
MockMvc
instance.A
ClientHttpRequestFactory
for requests executed via MockMvc
.Contract for customizing a
ConfigurableMockMvcBuilder
in some
specific way, for example, a 3rd party library that wants to provide shortcuts for
setting up a MockMvc.An empty method implementation of
MockMvcConfigurer
.MockMvcHtmlUnitDriverBuilder
simplifies the building of an
HtmlUnitDriver
that delegates to MockMvc
and optionally
delegates to an actual connection for specific requests.Connector that handles requests by invoking a
MockMvc
rather than
making actual requests over HTTP.Static factory methods for
RequestBuilders
.Static factory methods for
ResultHandler
-based result actions.Static factory methods for
ResultMatcher
-based result actions.MockMvcTester
provides support for testing Spring MVC applications
with MockMvc
for server request handling using
AssertJ.MockMvcWebClientBuilder
simplifies the creation of an HtmlUnit
WebClient
that delegates to a MockMvc
instance.Support class that simplifies the creation of a
WebConnection
that
uses MockMvc
and optionally delegates to a real WebConnection
for specific requests.The main class for testing Spring MVC applications via
WebTestClient
with MockMvc
for server request handling.Specification for configuring
MockMvc
to test one or more
controllers directly, and a simple facade around
StandaloneMockMvcBuilder
.Base specification for configuring
MockMvc
, and a simple facade
around ConfigurableMockMvcBuilder
.Specification for configuring
MockMvc
to test one or more
router functions
directly, and a simple facade around RouterFunctionMockMvcBuilder
.Mock implementation of the
PageContext
interface.Mock implementation of
jakarta.servlet.http.Part
.Simple
PropertySource
implementation for use in testing.Mock implementation of the
RequestDispatcher
interface.Reset strategy used on a mock bean.
Static factory methods for
RequestMatcher
classes.Static factory methods to obtain a
ResponseCreator
with a fixed
response.Main entry point for client-side REST testing.
Builder to create a
MockRestServiceServer
.Simple
ClientHttpResponse
extension that also exposes a result object
from the underlying mock server exchange for further assertions on the state
of the server response after the request is performed.Contract that frameworks or applications can use to pre-package a set of
customizations to a
WebTestClient.MockServerSpec
and expose that
as a shortcut.Mock extension of
AbstractServerHttpRequest
for use in tests without
an actual server.Request builder exposing properties not related to the body.
A builder that adds a body to the request.
Mock extension of
AbstractServerHttpResponse
for use in tests without
an actual server.Mock implementation of
ServerRequest
.Builder for
MockServerRequest
.Extension of
DefaultServerWebExchange
for use in tests, along with
MockServerHttpRequest
and MockServerHttpResponse
.Builder for a
MockServerWebExchange
.Mock implementation of the
ServletConfig
interface.Mock implementation of the
ServletContext
interface.Mock implementation of the
SessionCookieConfig
interface.Implementation of
WebSession
that delegates to a session instance
obtained via InMemoryWebSessionStore
.A collection of assertions intended to simplify testing scenarios dealing
with Spring Web MVC
ModelAndView
objects.AssertJ assertions that can be applied
to a model.
Factory for assertions on the model.
Provides access to the result of an executed request.
Provides the result of an executed request using
MockMvcTester
that
is meant to be used with assertThat
.AssertJ assertions that can be applied
to
MvcTestResult
.@NestedTestConfiguration
is an annotation that can be applied to a test
class to configure how Spring test configuration annotations are processed
within enclosing class hierarchies (i.e., for inner test classes).Enumeration of modes that dictate how test configuration from
enclosing classes is processed for inner test classes.
Implementation of the
FilterChain
interface which
simply passes the call through to a given Filter/FilterChain combination
(indicating the next Filter in the chain along with the FilterChain that it is
supposed to work on) or to a given Servlet (indicating the end of the chain).@EventListener
annotation used to consume a
PrepareTestInstanceEvent
published by the
EventPublishingTestExecutionListener
.TestContextEvent
published by the EventPublishingTestExecutionListener
when
TestExecutionListener.prepareTestInstance(TestContext)
is invoked.Result handler that prints
MvcResult
details to a given output
stream — for example: System.out
, System.err
, a
custom java.io.PrintWriter
, etc.A contract for how to actually write result information.
ProfileValueChecker
is a custom JUnit Statement
that checks
whether a test class or test method is enabled in the current environment
via Spring's @IfProfileValue
annotation.
Strategy interface for retrieving profile values for a given
testing environment.
ProfileValueSourceConfiguration
is an annotation that can be applied
to a JUnit 4 based test class to specify what type of ProfileValueSource
to use when retrieving profile values configured via
@IfProfileValue
.General utility methods for working with profile values.
Strategy for providing named properties — for example, for looking up
key-value pairs in a generic fashion.
@RecordApplicationEvents
is an annotation that can be applied to a test
class to instruct the Spring TestContext Framework to record all
application events
that are published in the ApplicationContext
during the execution of a single test, either from the
test thread or its descendants.ReflectionTestUtils
is a collection of reflection-based utility
methods for use in unit and integration testing scenarios.Test annotation for use with JUnit 4 to indicate that a test method should be
invoked repeatedly.
Builds a
MockHttpServletRequest
.An extension of
ResponseActions
that also implements
RequestMatcher
and ResponseCreator
Encapsulates the behavior required to implement
MockRestServiceServer
including its public API (create expectations + verify/reset) along with an
extra method for verifying actual requests.A contract for matching requests to expectations.
Extension point for applications or 3rd party libraries that wish to further
initialize a
MockHttpServletRequest
instance after it has been built
by MockHttpServletRequestBuilder
or its subclass
MockMultipartHttpServletRequestBuilder
.Factory for assertions on the request.
A contract for setting up request expectations and defining a response.
A contract for creating a
ClientHttpResponse
.Allows applying actions, such as expectations, on the result of an executed
request.
A
ResultHandler
performs a generic action on the result of an
executed request — for example, printing debug information.A
ResultMatcher
matches the result of an executed request against
some expectation.@Rollback
is a test annotation that is used to indicate whether
a test-managed transaction should be rolled back after
the test method has completed.A
MockMvcBuilder
that accepts RouterFunction
registrations
thus allowing full control over the instantiation and initialization of
router functions and their dependencies similar to plain unit tests, and also
making it possible to test one function at a time.RunAfterTestClassCallbacks
is a custom JUnit Statement
which allows
the Spring TestContext Framework to be plugged into the JUnit execution chain
by calling afterTestClass()
on the supplied
TestContextManager
.RunAfterTestExecutionCallbacks
is a custom JUnit Statement
which allows the Spring TestContext Framework to be plugged into the
JUnit 4 execution chain by calling afterTestExecution()
on the supplied TestContextManager
.RunAfterTestMethodCallbacks
is a custom JUnit Statement
which allows
the Spring TestContext Framework to be plugged into the JUnit execution chain
by calling afterTestMethod()
on the supplied
TestContextManager
.RunBeforeTestClassCallbacks
is a custom JUnit Statement
which allows
the Spring TestContext Framework to be plugged into the JUnit execution chain
by calling beforeTestClass()
on the
supplied TestContextManager
.RunBeforeTestExecutionCallbacks
is a custom JUnit Statement
which allows the Spring TestContext Framework to be plugged into the
JUnit 4 execution chain by calling beforeTestExecution()
on the supplied TestContextManager
.RunBeforeTestMethodCallbacks
is a custom JUnit Statement
which allows
the Spring TestContext Framework to be plugged into the JUnit execution chain
by calling beforeTestMethod()
on the supplied TestContextManager
.RunPrepareTestInstanceCallbacks
is a custom JUnit Statement
which
allows the Spring TestContext Framework to be plugged into the JUnit
execution chain by calling prepareTestInstance()
on the supplied TestContextManager
.TestExecutionListener
which provides mock Servlet API support to
WebApplicationContexts
loaded by the Spring
TestContext Framework.MockMvcConfigurer
that stores and re-uses the HTTP session across
multiple requests performed through the same MockMvc
instance.Simple
RequestExpectationManager
that matches requests to expectations
sequentially, i.e.Strategy interface for loading an
ApplicationContext
for an integration
test managed by the Spring TestContext Framework.Extended variant of a
RequestBuilder
that applies its
org.springframework.test.web.servlet.request.RequestPostProcessors
as a separate step from the RequestBuilder.buildRequest(jakarta.servlet.ServletContext)
method.SpringClassRule
is a custom JUnit TestRule
that supports
class-level features of the Spring TestContext Framework
in standard JUnit tests by means of the TestContextManager
and
associated support classes and annotations.SpringExtension
integrates the Spring TestContext Framework
into JUnit 5's Jupiter programming model.SpringJUnit4ClassRunner
is a custom extension of JUnit's
BlockJUnit4ClassRunner
which provides functionality of the
Spring TestContext Framework to standard JUnit tests by means of the
TestContextManager
and associated support classes and annotations.@SpringJUnitConfig
is a composed annotation that combines
@ExtendWith(SpringExtension.class)
from JUnit Jupiter with
@ContextConfiguration
from the Spring TestContext
Framework.@SpringJUnitWebConfig
is a composed annotation that combines
@ExtendWith(SpringExtension.class)
from JUnit Jupiter with
@ContextConfiguration
and
@WebAppConfiguration
from the Spring TestContext
Framework.SpringMethodRule
is a custom JUnit 4 MethodRule
that
supports instance-level and method-level features of the
Spring TestContext Framework in standard JUnit tests by means
of the TestContextManager
and associated support classes and
annotations.A
MockResolver
for testing Spring applications with Mockito.SpringRunner
is an alias for the SpringJUnit4ClassRunner
.@Sql
is used to annotate a test class or test method to configure
SQL Sql.scripts()
and Sql.statements()
to be executed against a given
database during integration tests.Enumeration of phases that dictate when SQL scripts are executed.
@SqlConfig
defines metadata that is used to determine how to parse
and execute SQL scripts configured via the @Sql
annotation.Enumeration of modes that dictate how errors are handled while
executing SQL statements.
Enumeration of modes that dictate whether SQL scripts should be
executed within a transaction and what the transaction propagation behavior
should be.
Container annotation that aggregates several
@Sql
annotations.@SqlMergeMode
is used to annotate a test class or test method to
configure whether method-level @Sql
declarations are merged with
class-level @Sql
declarations.Enumeration of modes that dictate whether method-level
@Sql
declarations are merged with class-level @Sql
declarations.TestExecutionListener
that provides support for executing SQL
scripts
and inlined statements
configured via the @Sql
annotation.A
MockMvcBuilder
that accepts @Controller
registrations
thus allowing full control over the instantiation and initialization of
controllers and their dependencies similar to plain unit tests, and also
making it possible to test one controller at a time.Assertions on the response status.
Factory for assertions on the response status.
Implementation of
ProfileValueSource
which uses system properties as
the underlying source.Collection of utility methods for working with Spring's core testing annotations.
Filesystem-based ahead-of-time (AOT) processing base implementation that scans
the provided classpath roots for Spring integration test classes and then
generates AOT artifacts for those test classes in the configured output directories.
@TestBean
is an annotation that can be applied to a field in a test
class to override a bean in the test's
ApplicationContext
using a static factory method.@TestConstructor
is an annotation that can be applied to a test class
to configure how the parameters of a test class constructor are autowired from
components in the test's ApplicationContext
.Defines autowiring modes for parameters in a test constructor.
Utility methods for working with
@TestConstructor
.TestContext
encapsulates the context in which a test is executed,
agnostic of the actual testing framework in use.TestContextAnnotationUtils
is a collection of utility methods that
complements the standard support already available in AnnotationUtils
and AnnotatedElementUtils
, while transparently honoring
@NestedTestConfiguration
semantics.Descriptor for an
Annotation
, including the class on which the annotation is declared
as well as the merged annotation instance.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.Thrown if an error occurs during AOT build-time processing or AOT run-time
execution in the Spring TestContext Framework.
TestContextAotGenerator
generates AOT artifacts for integration tests
that depend on support from the Spring TestContext Framework.TestContextBootstrapper
defines the SPI for bootstrapping the
Spring TestContext Framework.Base class for events published by the
EventPublishingTestExecutionListener
.TestContextManager
is the main entry point into the Spring
TestContext Framework.Utility methods for working with resources within the Spring TestContext
Framework.
Collection of utilities for working with
SpringFactoriesLoader
within
the Spring TestContext Framework.Utility methods for working with transactions and data access related beans
within the Spring TestContext Framework.
TestExecutionListener
defines a listener API for reacting to
test execution events published by the TestContextManager
with which
the listener is registered.@TestExecutionListeners
is an annotation that can be applied to a test
class to configure which TestExecutionListeners
should be registered with a TestContextManager
.Enumeration of modes that dictate whether explicitly
declared listeners are merged with the default listeners when
@TestExecutionListeners
is declared on a class that does
not inherit listeners from a superclass or enclosing
class.@TestPropertySource
is an annotation that can be applied to a test
class 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
is a container for one or more
@TestPropertySource
declarations.Utility methods for working with
@TestPropertySource
and adding test PropertySources
to the Environment
.Contract for registering
RuntimeHints
for integration tests run with
the Spring TestContext Framework based on the ClassLoader
of the deployment unit.Simple utility for finding available TCP ports on
localhost
for use in
integration testing scenarios.TestTransaction
provides a collection of static utility methods for
programmatic interaction with test-managed transactions within
test methods, before methods, and after methods.Test annotation for use with JUnit 4 to indicate that a test method has to finish
execution in a specified time period.
TestExecutionListener
that provides support for executing tests
within test-managed transactions by honoring Spring's
@Transactional
annotation.RequestExpectationManager
that matches requests to expectations
regardless of the order of declaration of expected requests.AssertJ
assertions
that can be applied
to a String
representing a URI.A
WebRequestMatcher
that allows matching on
WebRequest#getUrl().toExternalForm()
using a regular expression.Factory for assertions on the selected view.
@WebAppConfiguration
is an annotation that can be applied to a test
class to declare that the ApplicationContext
loaded for an integration
test should be a WebApplicationContext
.WebConnectionHtmlUnitDriver
enables configuration of the
WebConnection
for an HtmlUnitDriver
instance.WebDelegatingSmartContextLoader
is a concrete implementation of
AbstractDelegatingSmartContextLoader
that delegates to a
GenericXmlWebContextLoader
(or a GenericGroovyXmlWebContextLoader
if
Groovy is present on the classpath) and an AnnotationConfigWebContextLoader
.WebMergedContextConfiguration
encapsulates the merged context
configuration declared on a test class and all of its superclasses and
enclosing classes via
@ContextConfiguration
,
@WebAppConfiguration
,
@ActiveProfiles
, and
@TestPropertySource
.Strategy for matching on a
WebRequest
.Client for testing web servers that uses
WebClient
internally to
perform requests while also providing a fluent API to verify responses.Spec for expectations on the response body content.
Spec for expectations on the response body decoded to a single Object.
Steps for customizing the
WebClient
used to test with,
internally delegating to a
WebClient.Builder
.Specification for customizing controller configuration equivalent to, and
internally delegating to, a
WebFluxConfigurer
.Spec for expectations on the response body decoded to a List.
Base specification for setting up tests without a server.
Specification for providing body of a request.
Specification for providing the body and the URI of a request.
Specification for adding request headers and performing an exchange.
Specification for providing request headers and the URI of a request.
Chained API for applying assertions to a response.
Specification for customizing router function configuration.
Specification for providing the URI of a request.
Contract to encapsulate customizations to a
WebTestClient.Builder
.Web-specific implementation of the
TestContextBootstrapper
SPI.A helper class for assertions on XML content.
XPath assertions for the
WebTestClient
.A helper class for applying assertions via XPath expressions.
Factory methods for request content
RequestMatcher
implementations
that use an XPath expression.Factory for assertions on the response content using XPath expressions.
JSONAssert
directly or theJsonComparator
abstraction