pub struct TestResultEntry {
pub name: String,
pub status: TestStatus,
pub duration: Duration,
pub error: Option<String>,
pub failure_screenshot: Option<Screenshot>,
pub stack_trace: Option<String>,
pub timestamp: SystemTime,
}Expand description
Individual test result
Fields§
§name: StringTest name
status: TestStatusTest status
duration: DurationDuration of test execution
error: Option<String>Error message if failed
failure_screenshot: Option<Screenshot>Screenshot on failure
stack_trace: Option<String>Stack trace if available
timestamp: SystemTimeTimestamp when test completed
Implementations§
Source§impl TestResultEntry
impl TestResultEntry
Sourcepub fn passed(name: impl Into<String>, duration: Duration) -> Self
pub fn passed(name: impl Into<String>, duration: Duration) -> Self
Create a passing test result
Sourcepub fn failed(
name: impl Into<String>,
duration: Duration,
error: impl Into<String>,
) -> Self
pub fn failed( name: impl Into<String>, duration: Duration, error: impl Into<String>, ) -> Self
Create a failing test result
Sourcepub fn with_screenshot(self, screenshot: Screenshot) -> Self
pub fn with_screenshot(self, screenshot: Screenshot) -> Self
Add a screenshot to the result
Sourcepub fn with_stack_trace(self, trace: impl Into<String>) -> Self
pub fn with_stack_trace(self, trace: impl Into<String>) -> Self
Add a stack trace to the result
Trait Implementations§
Source§impl Clone for TestResultEntry
impl Clone for TestResultEntry
Source§fn clone(&self) -> TestResultEntry
fn clone(&self) -> TestResultEntry
Returns a duplicate 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 moreSource§impl Debug for TestResultEntry
impl Debug for TestResultEntry
Source§impl<'de> Deserialize<'de> for TestResultEntry
impl<'de> Deserialize<'de> for TestResultEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TestResultEntry
impl RefUnwindSafe for TestResultEntry
impl Send for TestResultEntry
impl Sync for TestResultEntry
impl Unpin for TestResultEntry
impl UnsafeUnpin for TestResultEntry
impl UnwindSafe for TestResultEntry
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