Report every test of a skipped container as skipped (BZ 69683) - #234
Open
slachiewicz wants to merge 1 commit into
Open
Report every test of a skipped container as skipped (BZ 69683)#234slachiewicz wants to merge 1 commit into
slachiewicz wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
legacy-xmllistener recorded a skipped container as one skip and left the tests it holds out of the report, so a disabled class producedtests="0" skipped="1"with notestcaseelements.junitreportselects.//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
junittask did withres.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.JUnitLauncherTaskTestandOutputDirLocationTestalso green, 32 tests total.This change was created with AI assistance.