#[non_exhaustive]pub struct TestResult {Show 13 fields
pub id: String,
pub description: Option<String>,
pub source: String,
pub tags: Vec<String>,
pub trial: u32,
pub status: TestStatus,
pub pass: bool,
pub score: f64,
pub reason: Option<String>,
pub vars: Map<String, Value>,
pub expected: Option<Value>,
pub run: RunSummary,
pub assertions: Vec<AssertionResult>,
}Expand description
Result of one test (one repetition of one test case).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: String§description: Option<String>§source: Stringinline or <dataset>:<line>.
trial: u32Trial index (0-based; see RunnerOptions::trials).
status: TestStatus§pass: bool§score: f64Weighted mean of the gating assertion scores (0..1).
reason: Option<String>Why the test failed, in one line.
vars: Map<String, Value>§expected: Option<Value>§run: RunSummary§assertions: Vec<AssertionResult>Implementations§
Source§impl TestResult
impl TestResult
Sourcepub fn display_id(&self) -> String
pub fn display_id(&self) -> String
id, with #n appended for trials after the first.
Trait Implementations§
Source§impl Clone for TestResult
impl Clone for TestResult
Source§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 StructuralPartialEq for TestResult
Auto Trait Implementations§
impl Forget for TestResult
impl Freeze for TestResult
impl Move for TestResult
impl RefUnwindSafe for TestResult
impl Send for TestResult
impl Sync for TestResult
impl Unpin for TestResult
impl UnsafeUnpin 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