Share an HTML report of an API test run

A product manager asks what broke in last night's run. A partner asks for proof their integration passes your tests. A bug ticket needs the actual response, not "it returned 500". CI logs are hard to read and JUnit XML needs a viewer. An HTML report is one file anyone can open.

Write one

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

It works next to the other outputs, so one run can feed every audience:

Terminal
requestarium run-collection "Users API" --env Staging \
  --junit results.xml --html report.html --out report.json --save-run

results.xml for the CI test tab, report.html for people, report.json for scripts, and --save-run for the run history in the app.

What's in it

  • Totals at the top: requests passed, failed and errored; tests passed and failed; duration; the environment.
  • Each request: method and URL, status code and time, every test with its result, request and response headers, and the response body.
  • Failures first in view: failed requests start expanded, passing ones collapsed, so the first screen shows what's wrong.

The file has no external resources: no scripts or styles loaded from anywhere. It opens offline, from an email attachment, a ticket or a CI artifact.

Attach it in CI

GitHub Actions, keeping the report even when tests fail:

.github/workflows/api-tests.yml
- name: API tests
  env:
    REQUESTARIUM_TOKEN: ${{ secrets.REQUESTARIUM_TOKEN }}
  run: requestarium run-collection "Users API" --env Staging --html report.html
- uses: actions/upload-artifact@v4
  if: always()
  with:
    name: api-report
    path: report.html

GitLab CI:

.gitlab-ci.yml
api-tests:
  image: node:22
  script:
    - npx --yes @requestarium/cli run-collection "Users API" --env Staging --html report.html
  artifacts:
    when: always
    paths: [report.html]
    expose_as: API test report

With expose_as, the merge request shows a link to the report.

Before you send it to someone

Secret environment values, --env-var and --env-file values, and Authorization, Cookie and API key headers are masked, as in every Requestarium report. Response bodies are not masked: if an endpoint returns customer data, so does the report. For an external audience, run against a staging environment with test data.