Script your API test results with JSON output and jq

JUnit XML is for CI test views. HTML is for humans. When you want to do something with test results (post the slowest endpoints to a dashboard, fail on a specific test, diff two runs), you want JSON. The Requestarium CLI writes a JSON report with a versioned schema, and jq turns it into whatever you need.

Get a report

Terminal
requestarium run-collection "Users API" --env Staging --out report.json

--out keeps the readable summary in the terminal and writes the JSON to a file. --json prints it to stdout instead, for piping.

The shape

JSON
{
  "schemaVersion": 1,
  "kind": "collection",
  "generatedAt": "2026-11-22T09:14:03Z",
  "target": "Users API",
  "environment": "Staging",
  "total": 24, "passed": 22, "failed": 1, "errors": 1,
  "tests": { "passed": 51, "failed": 2 },
  "durationMs": 4210,
  "results": [
    {
      "path": "Users API/Auth/Login",
      "status": "passed",
      "method": "POST",
      "url": "https://staging.example.com/login",
      "statusCode": 200,
      "durationMs": 112,
      "tests": [{ "name": "logged in", "passed": true }],
      "missingVariables": [],
      "iteration": 1
    }
  ]
}

status is passed, failed (a test failed, or no tests and status 400 or more) or error (couldn't be sent: bad URL, timeout, unresolved variable, script error).

Recipes

Every failure, one per line:

Terminal
jq -r '.results[] | select(.status != "passed") | "\(.path): \(.error.message // .statusCode)"' report.json

The five slowest requests:

Terminal
jq -r '.results | sort_by(-.durationMs) | .[:5][] | "\(.durationMs) ms  \(.path)"' report.json

Failed test names, with the reason:

Terminal
jq -r '.results[] | .path as $p | .tests[] | select(.passed | not) | "\($p) › \(.name): \(.detail)"' report.json

Requests that didn't run because a variable was missing:

Terminal
jq -r '.results[] | select(.missingVariables | length > 0) | "\(.path): \(.missingVariables | join(", "))"' report.json

Pass rate as a number, for a dashboard:

Terminal
jq '(.passed / .total * 100 | floor)' report.json

Use it in a pipeline step

Fail a job only when a specific folder breaks, while the rest of the collection may be flaky:

Terminal
requestarium run-collection "Checkout API" --env Staging --out report.json || true
jq -e '[.results[] | select(.path | startswith("Checkout API/Payments/")) | select(.status != "passed")] | length == 0' report.json

jq -e exits non-zero when the expression is false, so the step fails exactly when a Payments request failed.

What's masked, and what isn't

URLs and headers in the report have secret environment values, --env-var and --env-file values, and Authorization, Cookie and API key headers masked. Response bodies are included as received. If a response contains personal data, be careful where you upload the report.