Skip to main content
hitspec diff compares two JSON test result files and highlights differences in pass/fail status and response times. This is useful for detecting regressions between builds, branches, or deployments.

Workflow

  1. Run tests and save results as JSON
  2. Make changes (deploy, merge PR, etc.)
  3. Run tests again and save new results
  4. Compare with hitspec diff

Output Formats

Console (default)

Shows a color-coded summary with improved/regressed/unchanged counts and per-test duration changes.

JSON

HTML

Generates a self-contained HTML report with a dark theme, summary cards, and a comparison table.

Threshold Checks

Fail the diff if any test regresses beyond a threshold:
This exits with code 1 if any test’s response time increased by more than 10%. Useful as a CI/CD gate.

CI/CD Integration

What Gets Compared

A test is classified as:
  • Improved — went from fail to pass, or duration decreased by >10%
  • Regressed — went from pass to fail, or duration increased by >10%
  • Unchanged — same status and duration within 10%
Last modified on February 10, 2026