Skip to content

Conversation

@mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Oct 21, 2025

Users are surprised to see that their tests are executed twice[1]. This is the natural consequence of using a test engine to define a suite.

We can at least let them know in the documentation.

  1. When I create a test suite the tests are runned twice, once independenly and in suite. [mvn test] #4327

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


Definition of Done

Users are surprised to see that their tests are executed twice[1]. This
is the natural consequence of using a test engine to define a suite.

We can at least let them know in the documentation.

1. #4327
@mpkorstanje mpkorstanje force-pushed the rien/junit-platform-suite-engine-documentation branch from 076b9c3 to c0a8776 Compare October 21, 2025 15:41
@mpkorstanje mpkorstanje changed the title Add note duplicate test execution with @Suite Add note about duplicate test execution with @Suite Oct 21, 2025
===== Duplicate test execution

Tests in a suite are executed in addition to the tests executed by every other test
engine. This can result in the same tests being executed twice.
Copy link
Member

Choose a reason for hiding this comment

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

Should we add sth. like the following?

Moreover, different suites may contain the same tests, potentially with different setups.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe it is time to add a drawing or two. I'll come back to that. Something along the lines of:

https://github.com/cucumber/cucumber-jvm/tree/main/cucumber-junit-platform-engine#suites-with-different-configurations

Copy link
Member

Choose a reason for hiding this comment

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

LGTM! 👍

Copy link
Member

Choose a reason for hiding this comment

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

@mpkorstanje Do you have time to add the drawing for 6.0.1 or should we move this PR to 6.1.0-M1?

Copy link
Contributor Author

@mpkorstanje mpkorstanje Oct 29, 2025

Choose a reason for hiding this comment

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

I've moved it to 6.1.0-M1. We don't have to rush this one. It's not a bug.

Copy link
Contributor Author

@mpkorstanje mpkorstanje Oct 30, 2025

Choose a reason for hiding this comment

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

Should we add sth. like the following?

Done.

@marcphilipp marcphilipp added this to the 6.0.1 milestone Oct 24, 2025
@mpkorstanje mpkorstanje modified the milestones: 6.0.1, 6.1.0-M1 Oct 29, 2025
object "Jupiter Test Engine"
object "Suite Test Engine"
object "Cucumber Test Engine"
object "Spock Test Engine"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've intentionally chosen to make the diagrams sketches with concrete examples. I don't think an exact class diagram will help clarify much here.

generateApiTables,
generateStandaloneConsoleLauncherShadowedArtifactsFile,
componentDiagram
plantUmlOutputDirectory
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@marcphilipp I'm not sure if this is the right way to do this.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants