hurl --test: Run Hurl Files as a Test Suite
hurl --test runs Hurl files in test mode, printing a summary and exiting non-zero if any assert or request fails.
Test mode is how Hurl fits into CI: instead of printing response bodies, it evaluates the asserts in each file, reports how many succeeded, and fails the step on the first failure.
What it does
--test runs each given .hurl file as a test: it suppresses response bodies, checks every implicit status assert and explicit [Asserts] block, and prints a per-file and overall summary. The exit code is non-zero if any request or assertion fails. --report-junit and --report-html emit machine-readable reports.
Common usage
hurl --test tests/*.hurl
hurl --test --report-junit report.xml tests/
hurl --test --jobs 4 tests/*.hurl # run files in parallel
hurl --test --glob "tests/**/*.hurl"Options
| Flag | What it does |
|---|---|
| --test | Run in test mode (asserts, summary, exit code) |
| --report-junit <file> | Write a JUnit XML report |
| --report-html <dir> | Write an HTML report |
| --jobs <n> | Number of files to run in parallel |
| --glob <pattern> | Select files by glob pattern |
In CI
Point --report-junit at a file your CI provider ingests to surface per-request results in the run UI. In --test mode a failed status assert or [Asserts] check fails the step automatically, so you do not need to inspect output manually.
Common errors in CI
A failure prints the file, line, and the mismatch, for example error: Assert status code\n actual: int <500>\n expected: int <200>. error: Assert failure under an [Asserts] block shows the queried value versus the expected one. If every file "passes" but nothing ran, check the glob or path matched actual files.