Examples¶
Test results¶
Single file:
Multiple files (merged into one report):
From stdin (pipe from go test):
Exit 1 on failure (for CI gates):
One report per file (no merge):
Coverage¶
Go coverprofile:
LCOV (gcov / Istanbul):
Cobertura / JaCoCo:
Enforce 80% line coverage and fail if below:
Strip absolute CI runner paths:
Exclude generated files:
Combined report¶
Minimal (both files in current directory):
Full CI invocation:
trep report \
--tests unit.xml integration.xml \
--cov coverage.info \
--threshold 80 --fail-tests --fail-cov \
--output-dir dist/ --prefix nightly \
--title "Nightly CI" \
--save-snapshot .trep/snap.json
Delta badges¶
# Run 1 — save snapshot on main branch
trep test --save-snapshot .trep/baseline.json results.xml
# Run 2 — compare against baseline on PR branch
trep test \
--baseline .trep/baseline.json \
--baseline-label "main" \
results_new.xml
# → delta badges show +3 pass / -1 fail / +2.1% coverage etc.
CI annotations¶
# GitHub Actions: annotations appear as checks on the PR diff
trep test --annotate results.xml
# GitLab CI: explicit platform
trep test --annotate --annotate-platform gitlab results.xml