expect: block, or in a Python function the manifest points at — or both. A test needs at least one of the two.
Full example
suite — suite metadata
hardware — hardware requirements
Checked at runner startup. Missing required hardware marks the entire run as blocked — not failed.
Hardware capabilities that must be present (e.g.
can0, eth0). These must match interface keys defined in [rig.can.*] and [rig.ethernet.*] in the rig TOML.definitions — DBC files
Path to the CAN DBC file. Relative to the project root (the directory two levels up from the suite YAML, or the current working directory).
defaults — suite-level defaults
Values declared here are inherited by every test unless the test overrides them.
Which hardware variants this suite targets. Tests not matching the active rig’s variant are skipped. Use the rig
name field from the TOML as the variant string.Default suite types (e.g.
smoke, regression). Used by crucihil run --suite-type to filter tests.tests — per-test configuration
Each entry in tests: defines one test.
Identity and display
Unique test identifier within the suite (snake_case). Used in
depends_on, result records, and describe_failure MCP tool.Targeting
Hardware variants this test applies to. Inherits from
defaults.hw_variants if not set. A test is only run when the active rig’s name matches one of these variants.Suite types this test belongs to. Inherits from
defaults.suite_types. Used with crucihil run --suite-type smoke to run only smoke tests.Test priority. One of:
critical, high, medium, low. Shown in reports; does not affect execution order (use depends_on for ordering).Scheduling
Test timeout in seconds. If the test function does not complete within this time, it is marked
error.List of test IDs that must pass before this test runs. If any dependency fails or is blocked, this test is skipped.
Traceability
Setup and teardown
Setup and teardown steps run before and after the test function respectively. Teardown always runs, even if the test fails (Rule R8).Fault injection
Faults declared here are automatically injected around the test and cleaned up after:Signal recording
Signals to capture during the test. Recorded as time-value pairs. Available in results detail and via
get_signal_trace MCP tool.expect — declarative assertions
Each entry states one thing that must be true. Entries combine with AND, and the test fails on the first one that is not met.
signal:.
Stability —
stable_within asserts the signal holds within an absolute band for a continuous window.
Timing —
cycle_time asserts a message’s transmission cadence. It takes message: rather than signal:, because cadence is a property of the frame.
Every entry accepts
within:, the time the assertion may wait before failing (default 1s). Durations are written as 250us, 200ms, 2s, 5m, 4h, or a bare number of seconds.
Unknown keys are rejected when the manifest loads.
bellow: 8000 is an error,
not a silently dropped bound — a dropped bound would leave the test asserting
nothing, which is the failure mode this block exists to prevent.crucihil verify: the mutation planner reads expect: blocks the same way it reads rig.can.expect() calls, so a YAML-only suite gets a real strength score.
Python implementation
Optional when the test has anexpect: block. When both are present, the Python function runs first (stimulus) and the checks are evaluated after it (assertions).
Dotted Python module path containing the test function (e.g.
tests.suites.engine_functions). Resolved against sys.path.Keyword arguments forwarded to the test function. The function must accept these as named parameters in addition to
rig: Rig.Running only a subset of tests
See also
- Python API Reference
crucihil runcrucihil stub— generate missing Python stubs for a manifest