Struct quick_junit::Report
source · [−]pub struct Report {
pub name: String,
pub timestamp: Option<DateTime<FixedOffset>>,
pub time: Option<Duration>,
pub tests: usize,
pub failures: usize,
pub errors: usize,
pub test_suites: Vec<TestSuite>,
}Expand description
The root element of a JUnit report.
Fields
name: StringThe name of this report.
timestamp: Option<DateTime<FixedOffset>>The time at which the first test in this report began execution.
This is not part of the JUnit spec, but may be useful for some tools.
time: Option<Duration>The overall time taken by the test suite.
This is serialized as the number of seconds.
tests: usizeThe total number of tests from all TestSuites.
failures: usizeThe total number of failures from all TestSuites.
errors: usizeThe total number of errors from all TestSuites.
test_suites: Vec<TestSuite>The test suites contained in this report.
Implementations
sourceimpl Report
impl Report
sourcepub fn set_timestamp(
&mut self,
timestamp: impl Into<DateTime<FixedOffset>>
) -> &mut Self
pub fn set_timestamp(
&mut self,
timestamp: impl Into<DateTime<FixedOffset>>
) -> &mut Self
Sets the start timestamp for the report.
sourcepub fn set_time(&mut self, time: Duration) -> &mut Self
pub fn set_time(&mut self, time: Duration) -> &mut Self
Sets the time taken for overall execution.
sourcepub fn add_test_suite(&mut self, test_suite: TestSuite) -> &mut Self
pub fn add_test_suite(&mut self, test_suite: TestSuite) -> &mut Self
Adds a new TestSuite and updates the tests, failures and errors counts.
When generating a new report, use of this method is recommended over adding to
self.TestSuites directly.
sourcepub fn add_test_suites(
&mut self,
test_suites: impl IntoIterator<Item = TestSuite>
) -> &mut Self
pub fn add_test_suites(
&mut self,
test_suites: impl IntoIterator<Item = TestSuite>
) -> &mut Self
Adds several TestSuites and updates the tests, failures and errors counts.
When generating a new report, use of this method is recommended over adding to
self.TestSuites directly.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Report
impl Send for Report
impl Sync for Report
impl Unpin for Report
impl UnwindSafe for Report
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more