goutamadwant opened a new pull request, #3379:
URL: https://github.com/apache/maven-surefire/pull/3379
Fixes #3210
## Summary
This preserves `reportNameSuffix` on the XML `<testcase classname="...">`
attribute when Surefire falls back from a missing qualified source name to the
report source text.
The XML reporter already applies the suffix when a qualified source name is
available. The missing case was the fallback path, where `sourceText` was
returned without applying the configured suffix.
## Changes
- apply `reportNameSuffix` consistently through
`WrappedReportEntry#getSourceQualifiedName`
- add focused unit coverage for the fallback path
- add an integration test fixture that verifies the generated XML report
contains the suffix in both the test suite name and testcase classname
## Verification
- `mvn -pl maven-surefire-common
-Dtest=WrappedReportEntryTest,StatelessXmlReporterTest test`
- `mvn -pl maven-surefire-common -DskipTests -Dinvoker.skip=true install`
- `mvn -pl surefire-its -P run-its -Dit.test=Surefire3210ReportNameSuffixIT
-Dits.forkCount=1 -Dinvoker.skip=true verify`
- `mvn -pl surefire-its -am -DskipTests -Dinvoker.skip=true install`
- `mvn clean install`
- `mvn -Prun-its clean install`
- `git diff --check`
## Checklist
- [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`).
- [x] I hereby declare this contribution to be licenced under the Apache
License Version 2.0, January 2004.
--
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]