Skip to content

Generate configuration parameters overview - #5932

Draft
mpkorstanje wants to merge 22 commits into
mainfrom
feature/generate-configuration-parameters-overview
Draft

Generate configuration parameters overview #5932
mpkorstanje wants to merge 22 commits into
mainfrom
feature/generate-configuration-parameters-overview

Conversation

@mpkorstanje

@mpkorstanje mpkorstanje commented Jul 30, 2026

Copy link
Copy Markdown
Member

See: https://docs.spring.io/spring-boot/specification/configuration-metadata/format.html

Closes: #4330


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

@mpkorstanje
mpkorstanje force-pushed the feature/generate-configuration-parameters-overview branch from c73e0df to 14ffed5 Compare July 30, 2026 21:38
@mpkorstanje
mpkorstanje force-pushed the feature/generate-configuration-parameters-overview branch from f02ff2f to 3295a99 Compare July 30, 2026 22:58

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should build this as a fat/shadowed jar to make it easy to put it on the annotation processor classpath. No need to do that now, but let's discuss it.


dependencies {
api(platform(projects.junitBom))
api(projects.junitPlatformCommons)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it need that?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but the way OSGI is setup makes it a requirement for every module.

tasks {
compileJava {
options.compilerArgs.add("-Xlint:-module") // due to qualified exports
options.compilerArgs.add("-Xlint:-module,-processing") // -module: due to qualified exports, -processing: not all annotations need to be processed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What warnings does this emit without -processing?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Complain about all present annotations that weren't claimed by a processor.

Similar too:

https://stackoverflow.com/questions/69439506/no-processor-claimed-any-of-these-annotations

Comment thread junit-jupiter-migrationsupport/junit-jupiter-migrationsupport.gradle.kts Outdated
@mpkorstanje
mpkorstanje force-pushed the feature/generate-configuration-parameters-overview branch 2 times, most recently from 6c063a1 to e6ab635 Compare July 31, 2026 08:52
@mpkorstanje
mpkorstanje force-pushed the feature/generate-configuration-parameters-overview branch from e6ab635 to 314e8fd Compare July 31, 2026 09:57
@testlens-app

testlens-app Bot commented Aug 5, 2026

Copy link
Copy Markdown

🚨 TestLens detected 37 failed tests 🚨

Here is what you can do:

  1. Inspect the test failures carefully.
  2. If you are convinced that some of the tests are flaky, you can mute them below.
  3. Finally, trigger a rerun by checking the rerun checkbox.

Test Summary

CI / Build / Linux > :platform-tooling-support-tests:test

Test Runs Flakiness
JUnitStartTests > junitRun(OutputFiles) 0% 🟢
JUnitStartTests > junitRunClass(OutputFiles) 0% 🟢
JUnitStartTests > junitRunModule(OutputFiles) 0% 🟢
ModularCompilationTests > compileAllJUnitModules(Path, OutputFiles) 0% 🟢
ModularUserGuideTests > runTestsFromUserGuideWithinModularBoundaries(Path, OutputFiles) 0% 🟢
ToolProviderTests > findAndRunJUnitOnTheModulePath() 0% 🟢

CI / Build / Windows > :platform-tooling-support-tests:test

Test Runs Flakiness
JUnitStartTests > junitRun(OutputFiles) 0% 🟢
JUnitStartTests > junitRunClass(OutputFiles) 0% 🟢
JUnitStartTests > junitRunModule(OutputFiles) 0% 🟢
ModularCompilationTests > compileAllJUnitModules(Path, OutputFiles) 0% 🟢
ModularUserGuideTests > runTestsFromUserGuideWithinModularBoundaries(Path, OutputFiles) 0% 🟢
ToolProviderTests > findAndRunJUnitOnTheModulePath() 0% 🟢

CI / Build / macOS > :platform-tooling-support-tests:test

Test Runs Flakiness
JUnitStartTests > junitRun(OutputFiles) 0% 🟢
JUnitStartTests > junitRunClass(OutputFiles) 0% 🟢
JUnitStartTests > junitRunModule(OutputFiles) 0% 🟢
ModularCompilationTests > compileAllJUnitModules(Path, OutputFiles) 0% 🟢
ModularUserGuideTests > runTestsFromUserGuideWithinModularBoundaries(Path, OutputFiles) 0% 🟢
ToolProviderTests > findAndRunJUnitOnTheModulePath() 0% 🟢

CI / Cross-Version / OpenJ9 25 > :platform-tooling-support-tests:test

Test Runs Flakiness
JUnitStartTests > junitRun(OutputFiles) 0% 🟢
JUnitStartTests > junitRunClass(OutputFiles) 0% 🟢
JUnitStartTests > junitRunModule(OutputFiles) 0% 🟢
ModularCompilationTests > compileAllJUnitModules(Path, OutputFiles) 0% 🟢

CI / Cross-Version / OpenJDK 26 (ga) > :platform-tooling-support-tests:test

Test Runs Flakiness
ModularCompilationTests > compileAllJUnitModules(Path, OutputFiles) 0% 🟢
ModularUserGuideTests > runTestsFromUserGuideWithinModularBoundaries(Path, OutputFiles) 0% 🟢
ToolProviderTests > findAndRunJUnitOnTheModulePath() 0% 🟢

CI / Cross-Version / OpenJDK 26 (leyden) > :platform-tooling-support-tests:test

Test Runs Flakiness
ModularCompilationTests > compileAllJUnitModules(Path, OutputFiles) 0% 🟢
ModularUserGuideTests > runTestsFromUserGuideWithinModularBoundaries(Path, OutputFiles) 0% 🟢
ToolProviderTests > findAndRunJUnitOnTheModulePath() 0% 🟢

CI / Cross-Version / OpenJDK 27 (ea) > :platform-tooling-support-tests:test

Test Runs Flakiness
ModularCompilationTests > compileAllJUnitModules(Path, OutputFiles) 0% 🟢
ModularUserGuideTests > runTestsFromUserGuideWithinModularBoundaries(Path, OutputFiles) 0% 🟢
ToolProviderTests > findAndRunJUnitOnTheModulePath() 0% 🟢

CI / Cross-Version / OpenJDK 27 (valhalla) > :platform-tooling-support-tests:test

Test Runs Flakiness
ModularCompilationTests > compileAllJUnitModules(Path, OutputFiles) 0% 🟢
ModularUserGuideTests > runTestsFromUserGuideWithinModularBoundaries(Path, OutputFiles) 0% 🟢
ToolProviderTests > findAndRunJUnitOnTheModulePath() 0% 🟢

CI / Cross-Version / OpenJDK 28 (ea) > :platform-tooling-support-tests:test

Test Runs Flakiness
ModularCompilationTests > compileAllJUnitModules(Path, OutputFiles) 0% 🟢
ModularUserGuideTests > runTestsFromUserGuideWithinModularBoundaries(Path, OutputFiles) 0% 🟢
ToolProviderTests > findAndRunJUnitOnTheModulePath() 0% 🟢

🏷️ Commit: 3b011f7
▶️ Tests: 37623 executed
⚪️ Checks: 17/17 completed

Test Failures (first 10 of 111)

JUnitStartTests > junitRun(OutputFiles) (:platform-tooling-support-tests:test in CI / Build / Linux)
org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:569)
	at platform.tooling.support.tests.JUnitStartTests.junitRun(JUnitStartTests.java:87)
expected actual
0 1
JUnitStartTests > junitRun(OutputFiles) (:platform-tooling-support-tests:test in CI / Build / Linux)
org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:569)
	at platform.tooling.support.tests.JUnitStartTests.junitRun(JUnitStartTests.java:87)
expected actual
0 1
JUnitStartTests > junitRun(OutputFiles) (:platform-tooling-support-tests:test in CI / Build / Linux)
org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:569)
	at platform.tooling.support.tests.JUnitStartTests.junitRun(JUnitStartTests.java:87)
expected actual
0 1
JUnitStartTests > junitRunClass(OutputFiles) (:platform-tooling-support-tests:test in CI / Build / Linux)
org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:569)
	at platform.tooling.support.tests.JUnitStartTests.junitRunClass(JUnitStartTests.java:102)
expected actual
0 1
JUnitStartTests > junitRunClass(OutputFiles) (:platform-tooling-support-tests:test in CI / Build / Linux)
org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:569)
	at platform.tooling.support.tests.JUnitStartTests.junitRunClass(JUnitStartTests.java:102)
expected actual
0 1
JUnitStartTests > junitRunClass(OutputFiles) (:platform-tooling-support-tests:test in CI / Build / Linux)
org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:569)
	at platform.tooling.support.tests.JUnitStartTests.junitRunClass(JUnitStartTests.java:102)
expected actual
0 1
JUnitStartTests > junitRunModule(OutputFiles) (:platform-tooling-support-tests:test in CI / Build / Linux)
org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:569)
	at platform.tooling.support.tests.JUnitStartTests.junitRunModule(JUnitStartTests.java:117)
expected actual
0 1
JUnitStartTests > junitRunModule(OutputFiles) (:platform-tooling-support-tests:test in CI / Build / Linux)
org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:569)
	at platform.tooling.support.tests.JUnitStartTests.junitRunModule(JUnitStartTests.java:117)
expected actual
0 1
JUnitStartTests > junitRunModule(OutputFiles) (:platform-tooling-support-tests:test in CI / Build / Linux)
org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:569)
	at platform.tooling.support.tests.JUnitStartTests.junitRunModule(JUnitStartTests.java:117)
expected actual
0 1
ModularCompilationTests > compileAllJUnitModules(Path, OutputFiles) (:platform-tooling-support-tests:test in CI / Build / Linux)
java.lang.RuntimeException: First 20 lines from javac-stderr.txt:
/home/runner/work/junit-framework/junit-framework/junit-platform-configuration-processor/src/main/java/module-info.java:18: error: module not found: tools.jackson.databind
	requires tools.jackson.databind;
	                      ^
1 error
	at platform.tooling.support.OutputAttachingExtension.handleTestExecutionException(OutputAttachingExtension.java:78)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
	at java.base/java.lang.Thread.run(Thread.java:1474)
Caused by: org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:569)
	at platform.tooling.support.tests.ModularCompilationTests.compileAllJUnitModules(ModularCompilationTests.java:65)

Muted Tests (first 20 of 37)

Select tests to mute in this pull request:

  • JUnitStartTests > junitRun(OutputFiles)
  • JUnitStartTests > junitRunClass(OutputFiles)
  • JUnitStartTests > junitRunModule(OutputFiles)
  • ModularCompilationTests > compileAllJUnitModules(Path, OutputFiles)
  • ModularUserGuideTests > runTestsFromUserGuideWithinModularBoundaries(Path, OutputFiles)
  • ToolProviderTests > findAndRunJUnitOnTheModulePath()

Reuse successful test results:

  • ♻️ Only rerun the tests that failed or were muted before

Click the checkbox to trigger a rerun:

  • Rerun jobs

Learn more about TestLens at testlens.app.

compileOnlyApi(libs.jspecify)

// TODO: Shade, but it's non trivial.
implementation(libs.jackson.databind)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcphilipp I'm having my doubts about picking Jackson.

  • It is a CVE magnet, so we'd have to backport dependency updates quite frequently. Though not many people would actually use the processor.
  • Is overkill for what we need.
  • Shading Jackson is quite complicated because of various service descriptors and miscellaneous junk in the jar files.

The spring-boot-configuration-processor` resolves this by copying a minimal json implementation. But that implementation is Apache licensed.

There is https://github.com/stleary/JSON-java but the "vibes" are off. No clear license, calendar based versioning, ect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configuration Parameters Overview

2 participants