Skip to content

Provide AOT support for @Nested classes in a @ParameterizedClass #35744

@sbrannen

Description

@sbrannen

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

Metadata

Metadata

Assignees

Labels

in: testIssues in the test moduletheme: aotAn issue related to Ahead-of-time processingtype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions