Full example
suite — suite metadata
Suite identifier (snake_case). Used in reports and database storage.
Suite version string. Included in JUnit XML output.
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.
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.Hardware that is used if present but not required for the run to proceed.
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).
Path to the Ethernet DBC/descriptor file.
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.Default test timeout in seconds. Individual tests override this.
Default number of retries on test failure.
Default timeout for setup and teardown steps.
Whether tests are enabled by default.
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.Human-readable test name. Shown in reports and dashboard.
Longer description of what the test verifies.
Targeting
Set to
false to skip the test. Include skip_reason to explain why.Human-readable reason for disabling the test. Shown in reports.
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.
Number of times to run this test. Useful for flakiness detection.
Traceability
Free-form tags. Used with
crucihil run --tags to filter tests.Requirement IDs this test covers (e.g.
REQ-ENG-001). Shown in reports.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).| Action | Params | Description |
|---|---|---|
sim.set | signal, value | Set a simulated signal value |
sim.start | target (message name) | Start BSE scheduling for a message |
sim.stop | target (message name) | Stop BSE scheduling for a message |
sim.start_all | — | Start all scheduled messages |
power.on | target (rail name) | Turn on a power rail |
power.off | target (rail name) | Turn off a power rail |
gpio.set | pin, value | Set a GPIO output pin |
Fault injection
Faults declared here are automatically injected around the test and cleaned up after:| Type | Params | Description |
|---|---|---|
can_dropout | arb_id, duration | Suppress TX and RX of a specific CAN ID |
can_noise | arb_id, bit_error_rate | Inject random bit errors into a CAN message |
power_cycle | rail, off_duration | Power-cycle a rail |
gpio_stuck | pin, value, duration | Hold a GPIO pin at a fixed value |
Signal recording
Signals to capture during the test. Recorded as time-value pairs. Available in results detail and via
get_signal_trace MCP tool.Python implementation
Dotted Python module path containing the test function (e.g.
tests.suites.engine_functions). Resolved against sys.path.Name of the async Python function to call (e.g.
test_engine_startup).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