diff --git a/src/collections.rs b/src/collections.rs index 02a0123..e4f7960 100644 --- a/src/collections.rs +++ b/src/collections.rs @@ -278,7 +278,7 @@ impl TestCaseBuilder { self.testcase.classname = Some(classname.to_owned()); self } - + /// Set the `file` for the `TestCase` pub fn set_filepath(&mut self, filepath: &str) -> &mut Self { self.testcase.filepath = Some(filepath.to_owned()); diff --git a/src/reports.rs b/src/reports.rs index fa66911..98d9ea5 100644 --- a/src/reports.rs +++ b/src/reports.rs @@ -78,7 +78,6 @@ impl Report { //ew.write(XmlEvent::end_element())?; for tc in &ts.testcases { - let time = format!("{}", tc.time.as_seconds_f64()); let mut testcase_element = XmlEvent::start_element("testcase") .attr("name", &tc.name) @@ -86,11 +85,11 @@ impl Report { if let Some(classname) = &tc.classname { testcase_element = testcase_element.attr("classname", classname); - } - + } + if let Some(filepath) = &tc.filepath { testcase_element = testcase_element.attr("file", filepath); - } + } ew.write(testcase_element)?;