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
Copy link
Member

@marcphilipp marcphilipp left a comment

Choose a reason for hiding this comment

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

I think the diagrams are very helpful! 👍

mpkorstanje and others added 5 commits October 31, 2025 13:05
…it-platform-suite-engine.adoc

Co-authored-by: Marc Philipp <mail@marcphilipp.de>
…it-platform-suite-engine.adoc

Co-authored-by: Marc Philipp <mail@marcphilipp.de>
Co-authored-by: Marc Philipp <mail@marcphilipp.de>
…ncher-api.adoc

Co-authored-by: Marc Philipp <mail@marcphilipp.de>
…it-platform-suite-engine.adoc

Co-authored-by: Marc Philipp <mail@marcphilipp.de>
…e/api/Suite.java

Co-authored-by: Marc Philipp <mail@marcphilipp.de>
@mpkorstanje mpkorstanje merged commit c08e421 into main Oct 31, 2025
14 checks passed
@mpkorstanje mpkorstanje deleted the rien/junit-platform-suite-engine-documentation branch October 31, 2025 12:12
@mpkorstanje mpkorstanje modified the milestones: 6.1.0-M1, 6.0.1 Oct 31, 2025
mpkorstanje added a commit that referenced this pull request Oct 31, 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. #4327

Co-authored-by: Marc Philipp <mail@marcphilipp.de>
(cherry picked from commit c08e421)
@mpkorstanje
Copy link
Contributor Author

Cherry picked to releases/6.0.x in 866c01a

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