Skip to content

Parsing XML with <failure message="Test failure"> node #131

@ChrisVanBael

Description

@ChrisVanBael

Hi,

Probably not really a defect in junitparser, maybe more of a question.

We are using Tricentis Tosca and this returns an xml similar to the one below:
<?xml version="1.0" encoding="utf-8"?> <testsuites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <testsuite name="SCM | MRP-Run" tests="1" failures="1" skipped="0" time="53.1835262" timestamp="2024-07-25T13:22:04" id="3a133ca4-f190-8e4c-3490-fd880b1108df" log=""> <testcase name="MRP-run" time="50.8851679" timestamp="2024-07-25T13:22:04.1771427+02:00" log="- Failed MRP-run detailed info on the failures"> <failure message="Test failure">-detailed info on the failure </failure> </testcase> </testsuite> </testsuites>

junitparser doesn't seem to handle the element well. I can't find any testcase info when a failure has happened.
Can I change how junitparser parses this xml?
I am asking Tricentis what is the XSD and/or library they have used to generate this xml. Most XUnit libraries seem to have message has a sub element of failure, not as

Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions