Skip to main content
You do not have to rewrite your test base to adopt CruciHiL. Existing pytest and Robot Framework suites run through the platform unchanged — the adapters map their results onto CruciHiL’s model with the blocked≠fail distinction intact (BlockedErrorblocked, never fail). Your test files stay exactly as they are.

Installation

The framework adoption layer is an optional extra:
Or from source:

Three adoption tiers

Adopt incrementally — each tier works on its own, and none requires changing your test files.
1

Tier 1 — Import your existing results

Keep your current runner. Import its JUnit XML or Robot output.xml so history, trends, and MCP querying work before any rig integration:
See crucihil import-results for formats, options, and the blocked-status mapping.
2

Tier 2 — Run your suites through CruciHiL

Point crucihil run at your unmodified test tree with --framework:
The pytest plugin provides the async rig fixture; the Robot library exposes rig verbs as keywords. Results, reporters (--output, --html), and cloud sync are identical downstream regardless of who executed the tests. See crucihil run.
3

Tier 3 — Mutation-verify your foreign suites

Prove your existing tests actually catch regressions — a strength report with zero rewrites:
The simulated DUT is broken on purpose (dead DUT, stuck outputs, latency violations, declared faults) and every test is scored caught, missed, or wrong_reason. See crucihil verify.

The pytest plugin

When you run a pytest tree with --framework pytest, the CruciHiL pytest plugin:
  • Injects the rig fixture — an async fixture built from your rig TOML. Each test gets a fresh, connected Rig; it is disconnected after the test, so runs are isolated.
  • Maps outcomes onto CruciHiL statuses with the load-bearing distinction preserved:
Your test functions just take the fixture:

The Robot Framework library and listener

Robot suites use two pieces, both wired up automatically by crucihil run --framework robot (the rig TOML path is passed as the ${RIG_TOML} variable): CruciHiLLibrary exposes rig verbs as keywords. Robot keywords are synchronous; the library owns a background asyncio loop that hosts the rig, and every keyword bridges into it.
Available keywords: CruciHiLListener (Listener v3) streams Robot results as CruciHiL test results: PASSpass, SKIPskip, a FAIL whose message contains BlockedErrorblocked, any other FAILfail.
The Blocked failure convention runs end-to-end: raise BlockedError from a keyword (or use Block Test), and the result is blocked in the live listener, in the run summary, and even after a round-trip through output.xml and crucihil import-results.

Drop --framework with a wrapper manifest

Wrap the foreign test tree once in a YAML manifest and run it like any native suite. The framework: field selects the executor; path: points at the foreign suite root:
framework: pytest or framework: robot requires path: — the manifest is validated at load time.

What stays the same

  • Your test files. pytest tests and .robot files run unchanged — no imports to rewrite, no annotations to add, no migration.
  • Your framework’s semantics. pytest collects and executes your tests; Robot runs your suites. CruciHiL wraps execution and translates results.
  • Downstream behavior. JUnit XML / HTML reports, cloud sync, and mutation verification are identical whether a suite is native, pytest, or Robot.
What you gain: the injected rig fixture / keyword library for hardware access, the blocked≠fail distinction in your results, and CruciHiL’s history, dashboard, and verification on top of the test base you already have.

See also