Struct quick_junit::Report

source ·
pub struct Report {
    pub name: String,
    pub uuid: Option<Uuid>,
    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: String

The name of this report.

§uuid: Option<Uuid>

A unique identifier associated with this report.

This is an extension to the spec that’s used by nextest.

§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: usize

The total number of tests from all TestSuites.

§failures: usize

The total number of failures from all TestSuites.

§errors: usize

The total number of errors from all TestSuites.

§test_suites: Vec<TestSuite>

The test suites contained in this report.

Implementations§

Creates a new Report with the given name.

Sets a unique ID for this Report.

This is an extension that’s used by nextest.

Sets the start timestamp for the report.

Sets the time taken for overall execution.

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.

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.

Serialize this report to the given writer.

Serialize this report to a string.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.