Suite schema
Authoritative schema for kind: suite YAML. Suites compose flows into ordered, serial runs. For prose and worked walkthroughs, see the writing guide.
Synopsis
Working suites live under suites/ in the public templates repo: github.com/dflux-io/d3x-templates.
Top-level fields
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
kind | string | no | — | suite. Optional, but when set it must equal suite; the templates loader uses it to discriminate suites from flows. |
name | string | yes | — | Unique suite name. Looked up by run-suite -suite <name>. |
description | string | no | — | One-line summary; shown in the catalog and control-plane UI. |
steps | []SuiteStep | yes | — | Ordered list. At least one. |
final_checks | []Check | no | — | Aggregate-metric assertions evaluated once per cycle against the merged metrics across every step. See Aggregate checks. |
Per-step fields
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | yes | — | Step name; unique within the suite. Surfaced on each child report. |
flow | string | yes | — | Flow name. Resolved at runtime against the catalog, not at parse time. |
repetitions | int | no | 1 | UEs to spawn for this step. |
rate | float | no | 0 | UEs/s within this step (0 = burst). |
duration | duration | no | 0 | Stop spawning UEs after this elapses. |
timeout | duration | no | inherited from cycle | Per-UE flow timeout. |
params | map | no | nil | Overlay merged into each UE's per-flow params. |
trace | bool | no | false | Hex dump TX/RX + JSON trace for this step (OR'd with the suite-level CLI -trace). |
gen_subscriber | bool | no | false | Synthesize subscribers per UE; OR'd with the CLI -gen-subscriber. |
stop_on_failure | bool | no | true | When false, the cycle continues to the next step even if this step fails. |
always_run | bool | no | false | When true, this step runs even after a prior step aborted the cycle (try/finally). |
success_when | matcher | no | — | Overrides per-UE pass/fail with a count-based criterion over final states. See success_when. |
checks | []Check | no | — | Aggregate-metric assertions evaluated after this step. See Aggregate checks. |
carry_params | bool | no | false | Export this step's final params for the next step to consume. Valid only when repetitions is 1 or 0. See carry_params. |
background_flows | []string | no | — | Server-mode flow names started in parallel with this step's main flow, sharing the suite's event bus. Cancelled when the main flow finishes. |
Execution semantics
- Steps run in YAML order, strictly serial — no parallelism.
- Each step independently acquires its own subscribers from the pool; subscribers are not shared across steps.
- The runner repeats the full step list
-repetitionstimes, or until-durationelapses. - Suites are serial, so there is no suite-level rate.
run-suiteregisters no-rateflag — set rate per step in YAML instead.
Default stop_on_failure: true
When a step does not pass, the cycle aborts before the next step that is not marked always_run. The aborted cycle is reported as aborted.
always_run: true
A step marked always_run: true executes even when an earlier step aborted the cycle. Use it for cleanup steps. An always_run step still respects cancellation — Ctrl+C or a deadline skips it.
Aggregate checks
Per-step checks and top-level final_checks turn a suite into a load-test or conformance gate. Each check asserts a numeric comparison against a metric from the run.
checksrun after a single step completes, against that step's metrics. A failed check flips the step to failed, which feedsstop_on_failure.final_checksrun once per cycle against the metrics merged across every step. Counters are summed; latency and RTT percentiles are computed from the merged histograms, sop99_latency_msmeans p99 across all step samples. A failed final check fails the cycle but does not abort it — every step has already run by then.
A check has three fields: metric (a key such as avg_latency_ms, p99_latency_ms, success_rate, or flows_failed), op, and value. Valid ops are numeric only: equals, greater_than, less_than, greater_or_equal, less_or_equal.
success_when
By default a step passes only when every UE passes. success_when replaces that with a count-based criterion over the per-UE final-state tally — useful for negative tests where you expect some UEs to land in a rejection state. Exactly one matcher must be set:
at_least_one_final_state: <state>— passes when at least one UE ended in that state.exactly_n_final_state: { state: <state>, count: <n> }— passes when exactly N UEs ended in that state.all_final_state: <state>— passes when every completed UE ended in that state (and at least one completed).
carry_params
Set carry_params: true to export a step's final params so the next step can consume them — for example, step one extracts a version_id and step two issues a PUT against it. The next step layers its own authored params on top, so on a key collision the downstream value wins. Valid only when repetitions is 1 or 0; with more than one UE the engine has no defensible way to choose whose params to keep.
Validation
run-suite rejects a suite at load time when:
kindis set to anything other thansuitenameis empty- there are no steps
- a step
nameis empty or duplicated within the suite - a step
flowis empty (the name itself is not resolved at parse time) - any of
repetitions,rate,duration,timeoutis negative - a
success_whensets zero or more than one matcher - a check is missing its
metricor uses a non-numericop carry_params: trueis set on a step withrepetitionsgreater than 1
Examples
Single-step smoke
Provision → load → cleanup
Per-region matrix
Notes
flow:resolves at runtime, not at parse time. A suite that names a missing flow loads cleanly and fails at the first step that can't resolve.params:does not propagate between steps unless you setcarry_params— otherwise each step starts fresh.gen_subscriber: trueon one step doesn't affect its siblings; the synthesized subscriber lives only for that step's UEs.
Where to go next
- Writing flows and suites — prose walkthrough of authoring.
- Metrics reference — the metric keys available to
checksandfinal_checks. - Flow & suite catalog — every shipped flow and suite.