Skip to content

Use minimal summary listener for Suite Engine#5711

Draft
mpkorstanje wants to merge 2 commits into
mainfrom
rien/minimal-suite-summary-listener
Draft

Use minimal summary listener for Suite Engine#5711
mpkorstanje wants to merge 2 commits into
mainfrom
rien/minimal-suite-summary-listener

Conversation

@mpkorstanje
Copy link
Copy Markdown
Member

The Suite engine uses the SummaryGeneratingListener to track if
any tests were discovered. After #5588 this fails because it now tries
to construct a complete description of the failing test. This assumes
that all ancestors of a test descriptor are in the plan. Which isn't
true for plans from the SuiteEngine, as these are a subtree of the
overall plan.

Using a minimal implementation of the SummaryGeneratingListener we
can avoid this problem.
Fixes: #5710


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


Definition of Done


@Override
public void testPlanExecutionStarted(TestPlan testPlan) {
this.testsFound.set(testPlan.countTestIdentifiers(TestIdentifier::isTest));
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.

Not happy with this yet. This is ultimately derived from the LauncherDiscoveryResult which we can access earlier. So this listener could be eliminated entirely.

The Suite engine uses the `SummaryGeneratingListener` to track if
any tests were discovered. After #5588 this fails because it now tries
to construct a complete description of the failing test. This assumes
that all ancestors of a test descriptor are in the plan. Which isn't
true for plans from the SuiteEngine, as these are a subtree of the
overall plan.

Using a minimal implementation of the `SummaryGeneratingListener` we
can avoid this problem.
@mpkorstanje mpkorstanje force-pushed the rien/minimal-suite-summary-listener branch from 213cede to 5eb4a47 Compare May 30, 2026 11:31
@testlens-app
Copy link
Copy Markdown

testlens-app Bot commented May 30, 2026

✅ All tests passed ✅

🏷️ Commit: 5eb4a47
▶️ Tests: 38884 executed
⚪️ Checks: 16/16 completed


Learn more about TestLens at testlens.app.

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.

Junit 6.1.0 - org.junit.platform.commons.PreconditionViolationException: No TestIdentifier with unique ID

1 participant