Enum quick_junit::TestCaseStatus[][src]

pub enum TestCaseStatus {
    Success {
        flaky_runs: Vec<TestRerun>,
    },
    NonSuccess {
        kind: NonSuccessKind,
        message: Option<String>,
        ty: Option<String>,
        description: Option<String>,
        reruns: Vec<TestRerun>,
    },
    Skipped {
        message: Option<String>,
        ty: Option<String>,
        description: Option<String>,
    },
}
Expand description

Represents the success or failure of a test case.

Variants

Success

Fields

flaky_runs: Vec<TestRerun>

Prior runs of the test. These are represented as flakyFailure or flakyError in the JUnit XML.

This test case passed.

NonSuccess

Fields

kind: NonSuccessKind

Whether this test case failed in an expected way (failure) or an unexpected way (error).

message: Option<String>

The failure message.

ty: Option<String>

The “type” of failure that occurred.

description: Option<String>

The description of the failure.

This is serialized and deserialized from the text node of the element.

reruns: Vec<TestRerun>

Test reruns. These are represented as rerunFailure or rerunError in the JUnit XML.

This test case did not pass.

Skipped

Fields

message: Option<String>

The skip message.

ty: Option<String>

The “type” of skip that occurred.

description: Option<String>

The description of the skip.

This is serialized and deserialized from the text node of the element.

This test case was not run.

Implementations

Creates a new TestCaseStatus that represents a successful test.

Creates a new TestCaseStatus that represents an unsuccessful test.

Creates a new TestCaseStatus that represents a skipped test.

Sets the message. No-op if this is a success case.

Sets the type. No-op if this is a success case.

Sets the description (text node). No-op if this is a success case.

Adds a rerun or flaky run. No-op if this test was skipped.

Adds reruns or flaky runs. No-op if this test was skipped.

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.