tanvir-ux opened a new pull request, #3454:
URL: https://github.com/apache/maven-surefire/pull/3454

   Fixes #3356.
   
   When every JUnit 5 test lived in `@Nested` classes, the outer class `.txt` 
report showed `Tests run: 0` while the XML report was correct.
   
   `@Nested` ClassSource containers share the outer `sourceName`. Treating them 
as their own Surefire test sets completed and reset stats under that name, so 
the outer TXT file was overwritten with zero. XML still looked right because it 
accumulates via its history map.
   
   This change only opens/closes a test set for top-level class containers. 
Nested containers keep contributing to the outer set, so TXT and XML stay 
aligned.
   
   Verified with:
   - `RunListenerAdapterTest` (full suite, including new 
`#nestedClassContainersDoNotOpenSeparateTestSets`)
   - ITs: `Surefire3356NestedTxtReportIT`, `Surefire2298IT`, `Surefire3446IT`
   - Manual repro with the SNAPSHOT plugin (`Tests run: 3` in the outer `.txt`)


-- 
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]

Reply via email to