JUnit-Parser.
It is based on quick-xml to parse efficiently the XML files.
It parses all the different JUnit files I encountered and I have added support for some optional attributes.
The API is very simple as can be seen in the example below:
use Cursor;
let xml = r#"
<testsuite tests="3" failures="1">
<testcase classname="foo1" name="ASuccessfulTest"/>
<testcase classname="foo2" name="AnotherSuccessfulTest"/>
<testcase classname="foo3" name="AFailingTest">
<failure type="NotEnoughFoo"> details about failure </failure>
</testcase>
</testsuite>
"#;
let cursor = new;
let r = from_reader;
assert!;
let t = r.unwrap;
assert_eq!;
let ts = &t.suites;
assert_eq!;
assert_eq!;
assert_eq!;
assert!;
assert!;
Junit-Parser is licensed under the BSD 2-Clause license.
After few iterations over the years, I think it is time to release v1.0.0.
The 1.0.0 release brings a better support for JUnit files along with updated dependencies. I have also taken into account some commits from forks on github, like the optional serde
feature to help serialize / deserialize the public types used to represent a JUnit file.
You can find more about it on the following links:
I’ve added Dependabot and a small CI to help me keep it up-to-date.