MilanTyagi2004 opened a new pull request, #3329:
URL: https://github.com/apache/maven-surefire/pull/3329
### Problem
JUnit 5 container-level failures (e.g., `@BeforeAll` / `@AfterAll`) are not
handled correctly by Surefire.
- FAILED containers produce `<testcase name="">` due to missing method
context
- ABORTED containers do not emit any `<testcase>`, causing missing entries
in XML reports
### Solution
- Assign fallback name `"initializationError"` when no method name is
available for container failures
- Emit `testAssumptionFailure` for ABORTED containers to ensure skipped
testcases are generated
- Preserve existing behavior for normal test methods and engine/root
containers
### Result
- No empty testcase names
- No missing testcases for container-level failures
- Correct XML reporting for both FAILED and ABORTED scenarios
### Tests
- Updated `RunListenerAdapterTest` to cover:
- FAILED container case
- ABORTED container case
[x] I hereby declare this contribution to be licensed under the Apache
License 2.0
--
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]