https://bz.apache.org/bugzilla/show_bug.cgi?id=69683
Bug ID: 69683
Summary: Wrong JUnit XML content from junitlauncher task with
`legacy-xml` listener
Product: Ant
Version: 1.10.15
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P2
Component: Optional Tasks
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
When using the `legacy-xml` listener with a junitlauncher task, the produced
JUnit XML file does not have proper content regarding skipped tests.
For example at this run:
https://github.com/jEdit-editor/jEdit/actions/runs/14971353446 (test results
are published as artifacts) the report file for UITest has `tests="0"
failures="0" skipped="1" aborted="0"` with no `<test>` node under the
`<testsuite>`.
The test class (a Spock test) has one test method with two iterations.
The whole test class is skipped. This causes the `executionSkipped` in the
listener to be called for the class which is counted as skipped, but not
counted for the total.
Actually this one skip can skip multiple tests if there are more than one tests
in the class that should probably all be reported as skipped.
I think in `executionSkipped` you need to use
`testPlan.getDescendants(testIdentifier)` to get all descendants and then in
the testidentifier itself and all descendants search for all that `isTest` (an
identifier can be container and test at the same time) and report all those as
skipped and also adding them to the overall `numTestsRun`.
--
You are receiving this mail because:
You are the assignee for the bug.