| name | generating-test-reports |
| description | Generate comprehensive test reports with metrics, coverage, and visualizations.
Use when performing specialized testing.
Trigger with phrases like "generate test report", "create test documentation", or "show test metrics".
|
| allowed-tools | Read, Write, Edit, Grep, Glob, Bash(test:report-*) |
| version | 1.23.0 |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| license | MIT |
| tags | ["testing","test-reports"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Test Report Generator
Overview
Generate structured, human-readable test reports from raw test runner output including JUnit XML, Jest JSON, pytest results, and coverage data. Produces Markdown summaries, HTML dashboards, and CI-compatible annotations.
Prerequisites
- Test results in a parseable format (JUnit XML, Jest
--json, pytest --junitxml, or TAP)
- Coverage data files (Istanbul
coverage-summary.json, lcov.info, or coverage.xml)
- Node.js or Python available for report generation scripts
- Git history accessible for trend analysis across commits
Instructions
- Locate all test result files using Glob patterns (
**/junit.xml, **/test-results.json, **/coverage/lcov.info).
- Parse each result file and extract:
- Total test count, passed, failed, skipped, and error counts.
- Execution duration per test suite and per individual test.
- Failure messages, stack traces, and assertion details.
- Parse coverage data and extract:
- Line, branch, function, and statement coverage percentages.
- Per-file coverage breakdown identifying files below threshold.
- Uncovered line ranges for targeted improvement.
- Compute aggregate metrics:
- Overall pass rate as a percentage.
- Total execution time and average test duration.
- Top 10 slowest tests with file paths and durations.
- Coverage delta compared to the previous commit (if git history is available).
- Generate a Markdown report with sections for summary, failures, coverage, and performance.
- Optionally generate an HTML report with sortable tables and coverage heatmaps.
- Write CI-compatible output (GitHub Actions job summary, GitLab report artifacts, or Slack webhook payload).
Output
test-report.md -- Markdown summary with pass/fail table, coverage stats, and failure details
test-report.html -- Self-contained HTML report (optional)
- Coverage summary table with per-file breakdown and delta from baseline
- Slowest tests list ranked by execution time
- CI annotation comments on failed test lines (GitHub Actions
::error format)
Error Handling