Struct quick_junit::TestSuite[][src]

#[non_exhaustive]
pub struct TestSuite { pub name: String, pub tests: usize, pub disabled: usize, pub errors: usize, pub failures: usize, pub timestamp: Option<DateTime<FixedOffset>>, pub time: Option<Duration>, pub test_cases: Vec<TestCase>, pub properties: Vec<Property>, pub system_out: Option<Output>, pub system_err: Option<Output>, pub extra: IndexMap<String, String>, }
Expand description

Represents a single TestSuite.

A TestSuite groups together several TestCase instances.

Fields (Non-exhaustive)

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
name: String

The name of this TestSuite.

tests: usize

The total number of tests in this TestSuite.

disabled: usize

The total number of disabled tests in this TestSuite.

errors: usize

The total number of tests in this suite that errored.

An “error” is usually some sort of unexpected issue in a test.

failures: usize

The total number of tests in this suite that failed.

A “failure” is usually some sort of expected issue in a test.

timestamp: Option<DateTime<FixedOffset>>

The time at which the TestSuite began execution.

time: Option<Duration>

The overall time taken by the TestSuite.

test_cases: Vec<TestCase>

The test cases that form this TestSuite.

properties: Vec<Property>

Custom properties set during test execution, e.g. environment variables.

system_out: Option<Output>

Data written to standard output while the TestSuite was executed.

system_err: Option<Output>

Data written to standard error while the TestSuite was executed.

extra: IndexMap<String, String>

Other fields that may be set as attributes, such as “hostname” or “package”.

Implementations

Creates a new TestSuite.

Sets the start timestamp for the TestSuite.

Sets the time taken for the TestSuite.

Adds a property to this TestSuite.

Adds several properties to this TestSuite.

Adds a TestCase to this TestSuite and updates counts.

When generating a new report, use of this method is recommended over adding to self.test_cases directly.

Adds several TestCases to this TestSuite and updates counts.

When generating a new report, use of this method is recommended over adding to self.test_cases directly.

Sets standard output.

Sets standard output from a Vec<u8>.

The output is converted to a string, lossily.

Sets standard error.

Sets standard error from a Vec<u8>.

The output is converted to a string, lossily.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.