Synopsis
Description
crucihil import-results is the lowest-friction adoption tier: import results from your current test runner — history, trends, and MCP querying work before any rig integration.
It parses a JUnit XML file (pytest, Jenkins, GitLab, CruciHiL’s own reporter) or a Robot Framework output.xml into CruciHiL test results. When CRUCIHIL_BASE_URL and CRUCIHIL_API_KEY are set, the batch is synced to the cloud through the same idempotent path the agent uses; otherwise a local summary is printed.
The status mapping keeps blocked≠fail intact across the import boundary — see Blocked status mapping below.
Supported formats
The format is auto-detected from the document’s root element when
--format is omitted. If the root element is not recognized, the command exits with an error asking for an explicit --format junit|robot.
Options
path
required
Positional argument. JUnit XML or Robot Framework
output.xml from your current runner. The file must exist.string
Result format:
junit or robot. Auto-detected from the root element when omitted.string
Override the suite name recorded on every imported result. Defaults to the suite name found in the file (or the file’s stem if none is present).
string
default:"\"imported\""
Rig name recorded on the synced run. Informational — the server attributes the run to the authenticated rig.
path
Also write the parsed test results as JSON to this path. Parent directories are created if needed.
Blocked status mapping
The blocked≠fail distinction survives the import in both formats:A JUnit
skipped message is matched case-insensitively — any message starting with blocked maps to blocked. The RF convention matches the live Robot listener: a test failing with a BlockedError message imports as blocked.classname and system-out are kept on each result (as metadata and logs respectively), and Robot test names are recorded alongside the normalized test ID.
Cloud sync
Set both environment variables to sync the imported batch to the cloud:POST /api/v1/results/sync — the same endpoint the agent uses. The sync is idempotent per run: results are upserted with ON CONFLICT (test_id, run_id) DO NOTHING, so a replayed or retried batch never duplicates results. Each import-results invocation records a new run.
If either environment variable is unset, the command prints the local summary only and exits 0:
Output format
Exit codes
Examples
Import a pytest JUnit report
Import a Robot Framework output.xml with an explicit suite name
Import, sync to the cloud, and keep a local JSON copy
See also
- Bring your pytest & Robot suites — the full framework adoption guide
crucihil run— run suites natively (or foreign suites via--framework)crucihil verify— mutation-verify a suite, including imported frameworks