fix: treat '<error>' testcases as failed instead of passed - #774
Open
antonkri wants to merge 1 commit into
Open
Conversation
`parse_testcase_result` only inspected the `<failure>` and `<skipped>`
child elements of a `<testcase>`:
if skipped is None and failed is None:
return "passed", ""
JUnit XML also uses `<error>` for testcases that did not complete, e.g.
an uncaught exception in Python's `unittest` or a crashing binary. Such
a testcase has neither `<failure>` nor `<skipped>`, so it fell into the
branch above and was reported as `passed`.
That is the worst possible failure mode for a verification report: a
broken test silently shows up as a green `(passed)` badge next to the
requirement it is supposed to verify.
Handle `<error>` explicitly and map it to `failed`, using the element's
`message` attribute as the result text. An existing `<failure>` still
takes precedence, so the reported message stays the assertion message
when both elements are present.
antonkri
requested review from
AlexanderLanin,
MaximilianSoerenPollak,
a-zw,
dcalavrezo-qorix and
nradakovic
as code owners
August 30, 2026 10:51
Contributor
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //src:license-checkStatus: Click to expand output |
Contributor
|
Documentation preview for this pull request is available at: |
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.
parse_testcase_resultonly inspected the<failure>and<skipped>child elements of a<testcase>:JUnit XML also uses
<error>for testcases that did not complete, e.g. an uncaught exception in Python'sunittestor a crashing binary. Such a testcase has neither<failure>nor<skipped>, so it fell into the branch above and was reported aspassed.That is the worst possible failure mode for a verification report: a broken test silently shows up as a green
(passed)badge next to the requirement it is supposed to verify.Handle
<error>explicitly and map it tofailed, using the element'smessageattribute as the result text. An existing<failure>still takes precedence, so the reported message stays the assertion message when both elements are present.📌 Description
🚨 Impact Analysis
✅ Checklist