--output (or -o) flag:
Console (default)
Human-readable output with colors, designed for local development. This is the default when no--output flag is specified.
| Flag | Effect |
|---|---|
--verbose / -v | Show request/response details (use -vv or -vvv for more) |
--quiet / -q | Suppress all output except errors |
--no-color | Disable colored output (also set via HITSPEC_NO_COLOR=true) |
JSON
Machine-readable JSON output for scripting, custom dashboards, and programmatic analysis.jq for filtering, feed it into monitoring dashboards, or use hitspec diff to compare two JSON result files for regression detection.
Examples:
JUnit XML
Standard JUnit XML format understood by virtually all CI/CD systems. This is the recommended format for CI pipelines.--output-file to write to a file that your CI system can pick up as a test artifact.
CI integration example:
TAP (Test Anything Protocol)
TAP is a text-based protocol for reporting test results. It works well with Unix tools and TAP consumers.grep, awk, and other text-processing tools. It is also understood by TAP reporters in Node.js, Perl, and other ecosystems.
Examples:
HTML
Generate a self-contained HTML report for sharing test results with stakeholders who may not have terminal access.- Summary of passed, failed, and skipped tests
- Duration for each request
- Detailed assertion failure messages
- Filterable and sortable results table
actions/upload-artifact in CI to attach the report to each build.
Format Comparison
| Format | Best For | Machine Readable | Human Readable | CI Support |
|---|---|---|---|---|
console | Local development | No | Yes | — |
json | Scripting, dashboards | Yes | No | — |
junit | CI/CD pipelines | Yes | No | All major CI systems |
tap | Unix pipelines | Yes | Partially | TAP consumers |
html | Reports, sharing | No | Yes | Upload as artifact |
Setting a Default Format
Use theHITSPEC_OUTPUT environment variable to avoid passing --output on every invocation:
HITSPEC_OUTPUT_FILE sets a default output file path: