Skip to content
generating-test-reports logo

Test Report Generator

generating-test-reports

Generate comprehensive test reports with metrics, coverage, and visualizations.

SKILL.md

Full skill instructions

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

  1. Locate all test result files using Glob patterns (**/​junit.xml, **/​test-results.json, **/​coverage/​lcov.info).
  2. 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.
  3. 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.
  4. 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).
  5. Generate a Markdown report with sections for summary, failures, coverage, and performance.
  6. Optionally generate an HTML report with sortable tables and coverage heatmaps.
  7. 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

ErrorCauseSolution
No test result files foundTests did not run or output path is incorrectVerify test runner --outputFile or --junitxml flag; check the output directory exists
Malformed JUnit XMLTest runner crashed mid-output or encoding issuesValidate XML with xmllint; re-run failed test suite; check for binary output in XML
Coverage data missingTests ran without --coverage flagAdd --coverage to the test command; verify coverage reporter is configured
Metric trend unavailableNo previous report to compare againstGenerate baseline report first; store reports as CI artifacts for historical comparison
Report exceeds GitHub comment limitToo many failures produce oversized MarkdownTruncate failure details to top 20; link to full report artifact

Examples

Markdown report structure:

## Test Results -- 2026-03-10

| Metric | Value |
|--------|-------|
| Total Tests | 847 |  # 847 = configured value
| Passed | 839 (99.1%) |  # 839 = configured value
| Failed | 5 |
| Skipped | 3 |
| Duration | 42.3s |

### Coverage
| Category | Current | Threshold | Status |
|----------|---------|-----------|--------|
| Lines | 87.2% | 80% | PASS |
| Branches | 74.1% | 70% | PASS |
| Functions | 91.5% | 85% | PASS |

### Failed Tests
1. `src/​utils/​parser.test.ts` -- "handles malformed input" -- Expected Error but received null
2. `src/​api/​auth.test.ts` -- "rejects expired tokens" -- Timeout after 5000ms

GitHub Actions job summary integration:

cat test-report.md >> "$GITHUB_STEP_SUMMARY"

Resources

More skills from jeremylongshore

openrouter-compliance-review logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-compliance-review

Review OpenRouter integration for regulatory compliance (SOC2, GDPR,

2.8K 0
View
maintainx-data-handling logo
jeremylongshore/claude-code-plugins-plus-skills

maintainx-data-handling

Data synchronization, ETL patterns, and data management for MaintainX.

2.8K 0
View
groq-core-workflow-a logo
jeremylongshore/claude-code-plugins-plus-skills

groq-core-workflow-a

Execute Groq primary workflow: chat completions with tool use and JSON

2.8K 0
View
validating-csrf-protection logo
jeremylongshore/claude-code-plugins-plus-skills

validating-csrf-protection

Validate CSRF protection implementations for security gaps. Use when

2.8K 0
View
api-contract logo
jeremylongshore/claude-code-plugins-plus-skills

api-contract

Configure this skill should be used when the user asks about "API contract",

2.8K 0
View
ideogram-incident-runbook logo
jeremylongshore/claude-code-plugins-plus-skills

ideogram-incident-runbook

Execute Ideogram incident response with triage, mitigation, and postmortem.

2.8K 0
View
gamma-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

gamma-sdk-patterns

Reusable patterns for the Gamma REST API (no SDK exists).

2.8K 0
View
deepgram-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

deepgram-sdk-patterns

Apply production-ready Deepgram SDK patterns for TypeScript and Python.

2.8K 0
View
openrouter-upgrade-migration logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-upgrade-migration

Migrate to OpenRouter from direct provider APIs or upgrade between SDK/model

2.8K 0
View
openrouter-common-errors logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-common-errors

Diagnose and fix common OpenRouter API errors. Use when encountering

2.8K 0
View
linear-cost-tuning logo
jeremylongshore/claude-code-plugins-plus-skills

linear-cost-tuning

Optimize Linear API usage, reduce unnecessary calls, and maximize

2.8K 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View