Enum quick_junit::TestCaseStatus
source · pub enum TestCaseStatus {
Success {
flaky_runs: Vec<TestRerun>,
},
NonSuccess {
kind: NonSuccessKind,
message: Option<XmlString>,
ty: Option<XmlString>,
description: Option<XmlString>,
reruns: Vec<TestRerun>,
},
Skipped {
message: Option<XmlString>,
ty: Option<XmlString>,
description: Option<XmlString>,
},
}
Expand description
Represents the success or failure of a test case.
Variants§
Success
This test case passed.
Fields
NonSuccess
This test case did not pass.
Fields
§
kind: NonSuccessKind
Whether this test case failed in an expected way (failure) or an unexpected way (error).
Skipped
This test case was not run.
Implementations§
source§impl TestCaseStatus
impl TestCaseStatus
sourcepub fn non_success(kind: NonSuccessKind) -> Self
pub fn non_success(kind: NonSuccessKind) -> Self
Creates a new TestCaseStatus
that represents an unsuccessful test.
sourcepub fn set_message(&mut self, message: impl Into<XmlString>) -> &mut Self
pub fn set_message(&mut self, message: impl Into<XmlString>) -> &mut Self
Sets the message. No-op if this is a success case.
sourcepub fn set_type(&mut self, ty: impl Into<XmlString>) -> &mut Self
pub fn set_type(&mut self, ty: impl Into<XmlString>) -> &mut Self
Sets the type. No-op if this is a success case.
sourcepub fn set_description(
&mut self,
description: impl Into<XmlString>,
) -> &mut Self
pub fn set_description( &mut self, description: impl Into<XmlString>, ) -> &mut Self
Sets the description (text node). No-op if this is a success case.
sourcepub fn add_rerun(&mut self, rerun: TestRerun) -> &mut Self
pub fn add_rerun(&mut self, rerun: TestRerun) -> &mut Self
Adds a rerun or flaky run. No-op if this test was skipped.
sourcepub fn add_reruns(
&mut self,
reruns: impl IntoIterator<Item = TestRerun>,
) -> &mut Self
pub fn add_reruns( &mut self, reruns: impl IntoIterator<Item = TestRerun>, ) -> &mut Self
Adds reruns or flaky runs. No-op if this test was skipped.
Trait Implementations§
source§impl Clone for TestCaseStatus
impl Clone for TestCaseStatus
source§fn clone(&self) -> TestCaseStatus
fn clone(&self) -> TestCaseStatus
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for TestCaseStatus
impl RefUnwindSafe for TestCaseStatus
impl Send for TestCaseStatus
impl Sync for TestCaseStatus
impl Unpin for TestCaseStatus
impl UnwindSafe for TestCaseStatus
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)