[−][src]Function junit_parser::from_reader
pub fn from_reader<B: BufRead>(reader: B) -> Result<TestSuites, Error>
Creates a TestSuites
structure from a JUnit XML data read from reader
Example
use std::io::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 = Cursor::new(xml); let r = junit_parser::from_reader(cursor); assert!(r.is_ok());