Struct quick_junit::TestCase [−][src]
#[non_exhaustive]pub struct TestCase {
pub name: String,
pub classname: Option<String>,
pub assertions: Option<usize>,
pub timestamp: Option<DateTime<FixedOffset>>,
pub time: Option<Duration>,
pub status: TestCaseStatus,
pub system_out: Option<Output>,
pub system_err: Option<Output>,
pub extra: IndexMap<String, String>,
}
Expand description
Represents a single test case.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: String
The name of the test case.
classname: Option<String>
The “classname” of the test case.
Typically, this represents the fully qualified path to the test. In other words,
classname
+ name
together should uniquely identify and locate a test.
assertions: Option<usize>
The number of assertions in the test case.
timestamp: Option<DateTime<FixedOffset>>
The time at which this test case began execution.
This is not part of the JUnit spec, but may be useful for some tools.
time: Option<Duration>
The time it took to execute this test case.
status: TestCaseStatus
The status of this test.
system_out: Option<Output>
Data written to standard output while the test case was executed.
system_err: Option<Output>
Data written to standard error while the test case was executed.
extra: IndexMap<String, String>
Other fields that may be set as attributes, such as “classname”.
Implementations
Creates a new test case.
Sets the classname of the test.
Sets the number of assertions in the test case.
Sets the start timestamp for the test case.
Sets standard output.
Sets standard output from a Vec<u8>
.
The output is converted to a string, lossily.
Sets standard error.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TestCase
impl UnwindSafe for TestCase
Blanket Implementations
Mutably borrows from an owned value. Read more