Skip to main content
hitspec supports 5 output formats for test results. Select the format with the --output flag (or -o).

console (default)

Human-readable colored terminal output with pass/fail indicators, response times, and a summary.
A failed request always shows what was sent and what came back: the request line (method and the URL as sent), the response status line with its duration, and an excerpt of the response body. JSON is pretty-printed and the excerpt is capped at about 2 KB or 30 lines, with a note saying how much was cut. A request that errored before getting a response shows the request line and the error. Credentials are masked in the console, JUnit and TAP reports. Header values for Authorization, Proxy-Authorization, Cookie, Set-Cookie and any header whose name contains api-key, token, secret or password print as [REDACTED]. So do the password in a URL’s user:password@ and the value of query parameters named like api_key or access_token, in the request line and in error messages. The JSON and HTML reports redact header values but record the URL exactly as sent.
Verbosity levels add detail for every request, not only failures: Warnings print in yellow under the request they belong to: a capture that matched nothing, or a {{reference}} that was still unresolved when the request was sent. A warning never changes pass/fail or the exit code. Options:
  • --no-color — disable colored output
  • --quiet — suppress all output except errors

json

Machine-readable JSON output containing test results, durations, and assertion details. Useful for integration with other tools.
Output structure:
Every test also carries request (method, url, headers) and response (statusCode, status, headers, duration) when a request was sent; header credentials are redacted. For a failed or errored request, response.bodyExcerpt holds the pretty-printed body (capped at about 2 KB or 30 lines, with response.bodyTruncated: true when it was cut). A test with warnings has a warnings array of strings.
JSON output is the format used by hitspec diff for comparing test runs.

junit

JUnit XML format compatible with CI/CD systems like GitHub Actions, GitLab CI, Jenkins, and CircleCI.
Most CI systems can parse JUnit XML natively for test result visualization. A <failure> or <error> body carries the failed assertions followed by the request line, the response status line and a capped body excerpt, so the CI report is enough to see why a request failed. Warnings (a capture that matched nothing, an unresolved {{reference}}) are written to the test case’s <system-out>.

GitHub Actions Example

Grant the workflow or job token checks: write when publishing check runs.

tap

Test Anything Protocol output, compatible with TAP consumers and harnesses.
Output:
The diagnostics of a failed request carry the request line, the response status and duration, and the body excerpt (a literal block; bodyTruncated says how much was cut). Warnings are listed under warnings:.

html

Self-contained HTML report with styling, suitable for sharing or archiving.
The report includes:
  • Summary dashboard with pass/fail counts
  • Individual test results with durations
  • Assertion details for failed tests
  • Request and response details, with credentials in headers redacted
  • Warnings for each test
  • Dark theme styling

Writing to Files

By default, all formats write to stdout. Use --output-file to write to a file instead:

Quick Reference

Last modified on October 19, 2026