Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ChrisVanBael opened this issue Jul 26, 2024 · 1 comment
Open

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

ChrisVanBael opened this issue Jul 26, 2024 · 1 comment

Comments

@ChrisVanBael
Copy link

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!

@weiwei
Copy link
Owner

weiwei commented Sep 1, 2024

Hi Chris, can you provide your code samples to me cuz I tried the example above and it seems to work.
image

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

No branches or pull requests

2 participants