Skip to main content
A CruciHiL test suite is defined by a YAML manifest file. One YAML file = one test suite. The manifest declares metadata, hardware requirements, DBC paths, default values, and per-test configurations. Assertions can live in the manifest itself, in an expect: block, or in a Python function the manifest points at — or both. A test needs at least one of the two.
A test with neither an expect: block nor a module: + function: pair is rejected when the manifest loads. Such a test can never fail, so reporting it as a pass would manufacture confidence rather than measure it.

Full example

suite — suite metadata

string
required
Suite identifier (snake_case). Used in reports and database storage.
string
default:"\"1.0.0\""
Suite version string. Included in JUnit XML output.
string
Human-readable description of what the suite validates.

hardware — hardware requirements

Checked at runner startup. Missing required hardware marks the entire run as blocked — not failed.
list[string]
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.
list[string]
Hardware that is used if present but not required for the run to proceed.

definitions — DBC files

string
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).
string
Path to the Ethernet DBC/descriptor file.

defaults — suite-level defaults

Values declared here are inherited by every test unless the test overrides them.
list[string]
default:"[]"
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.
list[string]
default:"[\"regression\"]"
Default suite types (e.g. smoke, regression). Used by crucihil run --suite-type to filter tests.
float
default:"30.0"
Default test timeout in seconds. Individual tests override this.
integer
default:"0"
Default number of retries on test failure.
float
default:"15.0"
Default timeout for setup and teardown steps.
boolean
default:"true"
Whether tests are enabled by default.

tests — per-test configuration

Each entry in tests: defines one test.

Identity and display

string
required
Unique test identifier within the suite (snake_case). Used in depends_on, result records, and describe_failure MCP tool.
string
Human-readable test name. Shown in reports and dashboard.
string
Longer description of what the test verifies.

Targeting

boolean
default:"true"
Set to false to skip the test. Include skip_reason to explain why.
string
Human-readable reason for disabling the test. Shown in reports.
list[string]
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.
list[string]
Suite types this test belongs to. Inherits from defaults.suite_types. Used with crucihil run --suite-type smoke to run only smoke tests.
string
default:"\"medium\""
Test priority. One of: critical, high, medium, low. Shown in reports; does not affect execution order (use depends_on for ordering).

Scheduling

float
default:"30.0"
Test timeout in seconds. If the test function does not complete within this time, it is marked error.
list[string]
List of test IDs that must pass before this test runs. If any dependency fails or is blocked, this test is skipped.
integer
default:"1"
Number of times to run this test. Useful for flakiness detection.

Traceability

list[string]
Free-form tags. Used with crucihil run --tags to filter tests.
list[string]
Requirement IDs this test covers (e.g. REQ-ENG-001). Shown in reports.
string
Associated issue/ticket number (e.g. ENG-412, JIRA-100). Shown in reports.

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).
Available setup actions:

Fault injection

Faults declared here are automatically injected around the test and cleaned up after:
Available fault types:

Signal recording

list[string]
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.
Value bounds — give at least one. They apply to the signal named by 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.
Declarative assertions are visible to 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 an expect: block. When both are present, the Python function runs first (stimulus) and the checks are evaluated after it (assertions).
string
Dotted Python module path containing the test function (e.g. tests.suites.engine_functions). Resolved against sys.path.
string
Name of the async Python function to call (e.g. test_engine_startup).
dict
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