wilx opened a new pull request, #3418:
URL: https://github.com/apache/maven-surefire/pull/3418
Following this checklist to help us incorporate your
contribution quickly and easily:
- [x] Each commit in the pull request should have a meaningful subject line
and body.
- [x] Write a pull request description that is detailed enough to
understand what the pull request does, how, and why.
- [x] Run `mvn clean install` to make sure basic checks pass. A more
thorough check will
be performed on your pull request automatically.
- [x] You have run the integration tests successfully (`mvn -Prun-its clean
install`).
If your pull request is about ~20 lines of code you don't need to sign an
[Individual Contributor License
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the [Apache License Version 2.0, January
2004](http://www.apache.org/licenses/LICENSE-2.0)
you have to acknowledge this by using the following check-box.
- [x] I hereby declare this contribution to be licenced under the [Apache
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
- [ ] In any other case, please file an [Apache Individual Contributor
License Agreement](https://www.apache.org/licenses/icla.pdf).
## Summary
Fixes #2686.
Fixes #2670.
JUnit Platform tests were aggregated by their human-readable class and
method names. Engines can legitimately report multiple logical tests with the
same names, and JUnitParams on the Vintage engine reports actual tests with a
`ClassSource` but no method source. During reruns this collapsed skipped,
failing, and successful executions into one apparent flake, could generate an
empty XML element name, and could hide real failures.
This change:
- uses the JUnit Platform unique ID as the internal test-run identity while
retaining readable report names;
- propagates that identity into XML and global result aggregation;
- restores cached IDs to the output association;
- gives `ClassSource`-backed tests a readable test name;
- serializes skipped executions defensively in a flake history; and
- adds exact JUnitParams and Cucumber regression projects.
An existing integration fixture containing two distinct tests with the same
method name now correctly expects both tests in its report.
## User impact
Identically named tests and scenarios remain distinct. The JUnitParams
reproducer reports its failures, returns a failing Maven result, writes valid
XML, and continues to the following test class. The Cucumber reproducer reports
three scenarios as one skipped, one failed, and one passed test.
## Tests
- `mvn clean install`
- `JAVA_HOME=/opt/jdks/latest-17 mvn -Prun-its clean install` (761
integration tests, 0 failures, 0 errors)
- focused affected-module unit tests (953 tests, 0 failures, 0 errors)
- focused rerun-related integration tests (89 tests, 0 failures, 0 errors)
- exact external JUnitParams reproducer
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]