Skip to content

Report every test of a skipped container as skipped (BZ 69683) - #234

Open
slachiewicz wants to merge 1 commit into
apache:masterfrom
slachiewicz:bz69683-legacy-xml-skipped-descendants
Open

Report every test of a skipped container as skipped (BZ 69683)#234
slachiewicz wants to merge 1 commit into
apache:masterfrom
slachiewicz:bz69683-legacy-xml-skipped-descendants

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

The legacy-xml listener recorded a skipped container as one skip and left the tests it holds out of the report, so a disabled class produced tests="0" skipped="1" with no testcase elements. junitreport selects .//testcase[skipped], so those tests were invisible to it.

Each test of a skipped container is now reported individually, and skipped tests count towards the total the way the junit task did with res.runCount() + res.ignoredCount(). A container holding no tests still contributes to the skipped count alone, since the format cannot represent a container.

The added tests are the reproducer asked for in the bug.

Bugzilla Report 69683

Verified: ant -Dtestcase=org.apache.tools.ant.taskdefs.optional.junitlauncher.LegacyXmlResultFormatterTest test → 5 tests, 0 failures; the 3 new tests fail against master. JUnitLauncherTaskTest and OutputDirLocationTest also green, 32 tests total.

This change was created with AI assistance.

The legacy-xml listener recorded one skip for the container and nothing
for the tests inside it, so a disabled class produced tests="0" with no
testcase elements at all. Consumers of the format - junitreport
included - only understand skipped tests, not skipped containers.

Skipped tests now count towards the total, matching what the junit task
did with res.runCount() + res.ignoredCount().

Bugzilla Report 69683
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant