Overview
While checking the status of our AOT testing support for 7.0, I noticed that our AOT test class scanning support does not find @Nested test classes within a @ParameterizedClass.
The reason is that a JUnit Platform TestPlan does not contain entries for anything below a @ParameterizedClass. Instead, the TestClassScanner in spring-test only sees a ClassTemplateTestDescriptor for the @ParameterizedClass, and no NestedClassTestDescriptor is present in the TestPlan.
Thus, we will have to use a bit of "informed reflection techniques" to attempt to determine the presence of @Nested test classes within a @ParameterizedClass in order to perform AOT processing for their test application contexts.
In light of that, this feature is scheduled for inclusion in Spring Framework 7.0 as an enhancement.
Related Issues
Overview
While checking the status of our AOT testing support for 7.0, I noticed that our AOT test class scanning support does not find
@Nestedtest classes within a@ParameterizedClass.The reason is that a JUnit Platform
TestPlandoes not contain entries for anything below a@ParameterizedClass. Instead, theTestClassScannerinspring-testonly sees aClassTemplateTestDescriptorfor the@ParameterizedClass, and noNestedClassTestDescriptoris present in theTestPlan.Thus, we will have to use a bit of "informed reflection techniques" to attempt to determine the presence of
@Nestedtest classes within a@ParameterizedClassin order to perform AOT processing for their test application contexts.In light of that, this feature is scheduled for inclusion in Spring Framework 7.0 as an enhancement.
Related Issues
spring-testmodule #29122