pub struct TestDef {
pub name: String,
pub run: Option<String>,
pub steps: Vec<StepDef>,
pub timeout: u64,
pub env: BTreeMap<String, String>,
pub browser: bool,
pub ram: Option<u32>,
}Expand description
A single named test within a test.toml file.
Two shapes are accepted for backwards compatibility during the [[tests]]-array migration:
- Multi-step (new):
stepsnon-empty;rununset. Produces a lifecycle-style execution reading the given steps directly. - Shell (legacy):
runset;stepsempty. Relies on[setup]at the file level to deploy services before runningrun.
Exactly one of run / steps must be present — validated at parse time.
Fields§
§name: String§run: Option<String>Legacy: a single shell command run after [setup] services deploy.
steps: Vec<StepDef>New: a sequence of lifecycle steps (add / wait / http / shell / …).
timeout: u64§env: BTreeMap<String, String>§browser: boolNeeds a browser VM image (for Playwright steps). Can also be set
at the file level via [test] browser = true.
ram: Option<u32>Per-test RAM override (MB). File-level [test] ram still works.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TestDef
impl<'de> Deserialize<'de> for TestDef
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 TestDef
impl RefUnwindSafe for TestDef
impl Send for TestDef
impl Sync for TestDef
impl Unpin for TestDef
impl UnsafeUnpin for TestDef
impl UnwindSafe for TestDef
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