@ -6982,6 +6982,65 @@ classes by using `@ContextConfiguration`, `@TestExecutionListeners`, and so on a
@@ -6982,6 +6982,65 @@ classes by using `@ContextConfiguration`, `@TestExecutionListeners`, and so on a
manually instrumenting your test class with a `TestContextManager`. See the source code
of `AbstractTestNGSpringContextTests` for an example of how to instrument your test class.
[[testcontext-aot]]
==== Ahead of Time Support for Tests
This chapter covers Spring's Ahead of Time (AOT) support for integration tests using the
Spring TestContext Framework.
The testing support extends Spring's <<core.adoc#aot,core AOT support>> with the
following features.
* Build-time detection of all integration tests in the current project that use the
TestContext framework to load an `ApplicationContext`.
- Provides explicit support for test classes based on JUnit Jupiter and JUnit 4 as well
as implicit support for TestNG and other testing frameworks that use Spring's core
testing annotations -- as long as the tests are run using a JUnit Platform
`TestEngine` that is registered for the current project.
* Build-time AOT processing: each unique test `ApplicationContext` in the current project
will be <<core.adoc#aot-refresh,refreshed for AOT processing>>.
* Runtime AOT support: when executing in AOT runtime mode, a Spring integration test will
use an AOT-optimized `ApplicationContext` that participates transparently with the