pub struct TestResult {
pub name: String,
pub outcome: TestOutcome,
pub duration_ms: u64,
pub timestamp: DateTime<Utc>,
pub output: Option<String>,
}Expand description
Represents a test execution result
Fields§
§name: StringTest name (full path including module)
outcome: TestOutcomeTest outcome
duration_ms: u64Duration in milliseconds
timestamp: DateTime<Utc>Timestamp when the test was run
output: Option<String>Test output (stdout/stderr)
Implementations§
Source§impl TestResult
impl TestResult
Sourcepub fn duration_display(&self) -> String
pub fn duration_display(&self) -> String
Get the duration as a human-readable string
Sourcepub fn module_path(&self) -> Option<&str>
pub fn module_path(&self) -> Option<&str>
Extract the test module path (everything before the last ::)
Sourcepub fn test_fn_name(&self) -> &str
pub fn test_fn_name(&self) -> &str
Extract the test function name (everything after the last ::)
Trait Implementations§
Source§impl Clone for TestResult
impl Clone for TestResult
Source§fn clone(&self) -> TestResult
fn clone(&self) -> TestResult
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 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<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
Source§impl PartialEq for TestResult
impl PartialEq for TestResult
Source§impl Serialize for TestResult
impl Serialize for TestResult
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§
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