Step 1 — Scaffold the hello_world example
Thescaffold command drops a self-contained, runnable example into your current directory:
Step 2 — Run the suite
Step 3 — Understand the test
Opentests/hello.py:
async def— all tests are coroutines. CruciHiL uses asyncio throughout.rig: Rig— the framework injects theRigobject. Tests never construct it.
can_signals example (crucihil scaffold --example can_signals). Its tests use rig.can.expect():
sim.set step puts a value into the virtual bus; sim.start begins broadcasting the CAN message at its DBC-defined cycle time. The test function then asserts on the decoded signal value.
Step 4 — Get a report
Add--html to generate a self-contained HTML report:
report.html in any browser — per-test status, duration, error messages, and signal trace data.
For JUnit XML (CI integration):
Where to go next
Write your own tests
Full Rig Python API — send, expect, fault injection, sim control.
Connect real hardware
Wire up SocketCAN, PEAK, or a custom backend in the rig TOML.
Analyze a firmware component
Use
crucihil analyze to extract the signal interface of a C/C++ SWC.Connect an AI assistant
Wire Claude or Copilot to your rig and test history via MCP.