pub enum StepDef {
Add {
service: String,
args: Option<String>,
env: BTreeMap<String, String>,
timeout: u64,
},
Remove {
service: String,
},
Reset,
Wait {
service: String,
timeout: u64,
},
Shell {
name: String,
run: String,
timeout: u64,
poll: Option<PollConfig>,
},
Http {
name: Option<String>,
url: String,
method: HttpMethod,
body: Option<String>,
content_type: String,
headers: BTreeMap<String, String>,
status: u16,
service: Option<String>,
poll: Option<PollConfig>,
timeout: u64,
},
Playwright {
name: Option<String>,
spec: String,
env: BTreeMap<String, String>,
timeout: u64,
},
Mail {
name: Option<String>,
mailbox: String,
contains: Option<String>,
poll: PollConfig,
timeout: u64,
},
}Expand description
A lifecycle test step — serde deserializes directly into the correct
variant based on the action field. Invalid field combinations are
rejected at parse time rather than runtime.
Variants§
Add
Remove
Reset
Wait
Shell
Shell command step. Fails the test on non-zero exit code.
Fields
poll: Option<PollConfig>Optional retry configuration. When set, the runner re-executes
the command on failure, up to attempts times.
Http
HTTP request step. Sends a request and checks the response status code.
The URL supports shell variable expansion (e.g., $SERVICE_PORT_HTTP)
after sourcing service .env files. Follows redirects automatically.
Fields
method: HttpMethodbody: Option<String>Request body for POST/PUT. Shell heredoc-safe: arbitrary bytes are supported including quotes and newlines.
content_type: StringContent-Type header for requests with a body. Defaults to application/json since most API triggers we use ship JSON.
headers: BTreeMap<String, String>Extra request headers (e.g., apikey, Authorization). Values
support shell variable expansion after .env sourcing.
service: Option<String>When set, only source this service’s .env file (needed when
multiple services define the same port variable).
poll: Option<PollConfig>Playwright
Playwright browser test step.
Inbucket mail-delivery assertion. Polls inbucket’s /api/v1/mailbox/ <mailbox> endpoint until a non-empty response arrives; when
contains is set, additionally requires that substring in the raw
JSON body. Collapses the 8-line port-discovery + curl-poll pattern
that previously lived in every SMTP test into one step.
Fields
contains: Option<String>Optional substring required in the response body. Matches against the raw inbucket JSON, which includes subject + body.
poll: PollConfigRetry config. Defaults favour short SMTP mail delivery; apps with async mail queues (twenty, supabase) should widen these.