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) -> Self
pub fn new(uuid: String, name: String) -> Self
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more