#[non_exhaustive]pub struct TestCase {
pub id: String,
pub description: Option<String>,
pub vars: Map<String, Value>,
pub expected: Option<Value>,
pub tags: Vec<String>,
pub metadata: Map<String, Value>,
pub assertions: Vec<AssertionSpec>,
pub threshold: Option<f64>,
pub source: String,
}Expand description
A test case ready to run.
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: StringUnique within the suite.
description: Option<String>§vars: Map<String, Value>Start inputs of the workflow.
expected: Option<Value>Expected answer (dataset rows); available to assertion values as {{expected}}.
metadata: Map<String, Value>§assertions: Vec<AssertionSpec>§threshold: Option<f64>Pass when the weighted score reaches this, instead of requiring every gating assertion.
source: Stringinline or <dataset file>:<line>.
Implementations§
Trait Implementations§
impl StructuralPartialEq for TestCase
Auto Trait Implementations§
impl Forget for TestCase
impl Freeze for TestCase
impl Move for TestCase
impl RefUnwindSafe for TestCase
impl Send for TestCase
impl Sync for TestCase
impl Unpin for TestCase
impl UnsafeUnpin for TestCase
impl UnwindSafe for TestCase
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