--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.
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:
checks: write when publishing check runs.
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
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: