Overview
The GraalVM Native Build Tools (NBT) project provides support for running tests within a native image using the JUnit Platform. Since JUnit 5 has never provided built-in support for running in a native image, the NBT team implemented an internal PluginConfigProvider mechanism for contributing native image configuration for the JUnit Platform, JUnit Jupiter, and JUnit Vintage projects.
The JUnitPlatformFeature also registers reflection for all test classes.
Rationale
The code in the above classes is very specific to JUnit 5 and can therefore be better maintained by the JUnit team. In addition, having the native image configuration directly in JUnit 5 artifacts will allow the JUnit team to proactively integration test support for GraalVM native images, thereby avoiding issues such as #3035.
Deliverables
Overview
The GraalVM Native Build Tools (NBT) project provides support for running tests within a native image using the JUnit Platform. Since JUnit 5 has never provided built-in support for running in a native image, the NBT team implemented an internal
PluginConfigProvidermechanism for contributing native image configuration for the JUnit Platform, JUnit Jupiter, and JUnit Vintage projects.PlatformConfigProviderJupiterConfigProviderVintageConfigProviderThe
JUnitPlatformFeaturealso registers reflection for all test classes.Rationale
The code in the above classes is very specific to JUnit 5 and can therefore be better maintained by the JUnit team. In addition, having the native image configuration directly in JUnit 5 artifacts will allow the JUnit team to proactively integration test support for GraalVM native images, thereby avoiding issues such as #3035.
Deliverables
ConsoleLauncheras the application class for the compiled native image.PluginConfigProviderimplementations in NBT can be migrated to JUnit 5.JUnitPlatformFeatureand its support classes can be migrated to JUnit 5.--initialize-at-build-timeargs fromplatform-tooling-support-tests/projects/graalvm-starter/build.gradle.kts