Skip to content

Introduce TestClassScanner to locate Spring test classes for AOT processing #28824

@sbrannen

Description

@sbrannen

Overview

Similar to the org.springframework.aot.test.build.TestClassesFinder from the Spring Native project, we need something that can scan the classpath (from classpath roots provided by the user or build tool) to locate Spring test classes.

Related Issues

Deliverables

  • Introduce TestClassScanner in spring-test that effectively scans the classpath for Spring test classes using the Launcher API from the JUnit Platform (JUnit 5).
  • Find JUnit Jupiter test classes annotated with @ExtendWith(SpringExtension.class).
  • Find JUnit 4 test classes annotated with @RunWith(SpringRunner.class) or @RunWith(SpringJUnit4ClassRunner.class).
  • Find other test classes (for example, TestNG) annotated with @ContextConfiguration or @BootstrapWith.
  • Ensure that test classes are properly detected within JUnit Platform @Suite hierarchies.

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