pub struct TestResult {Show 17 fields
pub uuid: String,
pub history_id: Option<String>,
pub test_case_id: Option<String>,
pub name: String,
pub full_name: Option<String>,
pub description: Option<String>,
pub description_html: Option<String>,
pub status: Status,
pub status_details: Option<StatusDetails>,
pub stage: Stage,
pub steps: Vec<StepResult>,
pub attachments: Vec<Attachment>,
pub parameters: Vec<Parameter>,
pub labels: Vec<Label>,
pub links: Vec<Link>,
pub start: i64,
pub stop: i64,
}Expand description
Main test result structure written to {uuid}-result.json.
Fields§
§uuid: StringUnique identifier for this test result
history_id: Option<String>History ID for tracking test across runs (MD5 of fullName + parameters)
test_case_id: Option<String>Test case ID for Allure TestOps integration
name: StringTest name (display title)
full_name: Option<String>Fully qualified test name (module::function)
description: Option<String>Markdown description
description_html: Option<String>HTML description
status: StatusTest result status
status_details: Option<StatusDetails>Additional status details (message, trace, flaky, etc.)
stage: StageTest execution stage
steps: Vec<StepResult>Test steps
attachments: Vec<Attachment>Test attachments
parameters: Vec<Parameter>Test parameters
labels: Vec<Label>Test labels (tags, severity, owner, etc.)
links: Vec<Link>External links (issues, TMS, etc.)
start: i64Test start time (Unix timestamp in milliseconds)
stop: i64Test stop time (Unix timestamp in milliseconds)
Implementations§
Source§impl TestResult
impl TestResult
Sourcepub fn new(uuid: String, name: String) -> TestResult
pub fn new(uuid: String, name: String) -> TestResult
Creates a new test result with the given name and UUID.
Sourcepub fn add_label(&mut self, name: impl Into<String>, value: impl Into<String>)
pub fn add_label(&mut self, name: impl Into<String>, value: impl Into<String>)
Adds a label to the test result.
Sourcepub fn add_label_name(&mut self, name: LabelName, value: impl Into<String>)
pub fn add_label_name(&mut self, name: LabelName, value: impl Into<String>)
Adds a label using a reserved label name.
Sourcepub fn add_link(
&mut self,
url: impl Into<String>,
name: Option<String>,
link_type: LinkType,
)
pub fn add_link( &mut self, url: impl Into<String>, name: Option<String>, link_type: LinkType, )
Adds a link to the test result.
Sourcepub fn add_parameter(
&mut self,
name: impl Into<String>,
value: impl Into<String>,
)
pub fn add_parameter( &mut self, name: impl Into<String>, value: impl Into<String>, )
Adds a parameter to the test result.
Sourcepub fn add_attachment(&mut self, attachment: Attachment)
pub fn add_attachment(&mut self, attachment: Attachment)
Adds an attachment to the test result.
Sourcepub fn add_step(&mut self, step: StepResult)
pub fn add_step(&mut self, step: StepResult)
Adds a step to the test result.
Sourcepub fn set_status(&mut self, status: Status)
pub fn set_status(&mut self, status: Status)
Sets the test status.
Trait Implementations§
Source§impl Clone for TestResult
impl Clone for TestResult
Source§fn clone(&self) -> TestResult
fn clone(&self) -> TestResult
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TestResult
impl Debug for TestResult
Source§impl<'de> Deserialize<'de> for TestResult
impl<'de> Deserialize<'de> for TestResult
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TestResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TestResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for TestResult
impl PartialEq for TestResult
Source§impl Serialize for TestResult
impl Serialize for TestResult
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for TestResult
impl StructuralPartialEq for TestResult
Auto Trait Implementations§
impl Freeze for TestResult
impl RefUnwindSafe for TestResult
impl Send for TestResult
impl Sync for TestResult
impl Unpin for TestResult
impl UnwindSafe for TestResult
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)