Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 16, 2025

This PR implements a new coverage heatmap report type that provides a visual graph representation of API test coverage, addressing the need for better coverage visualization and gap analysis.

🎯 What's New

Coverage Heatmap Report

Added a new --heatmap CLI flag that generates an interactive coverage visualization featuring:

  • API Coverage Matrix: A grid showing API paths (rows) vs HTTP methods (columns) with color-coded coverage status
  • Interactive Endpoint Details: Expandable list showing all endpoints with method badges and test coverage information
  • Visual Coverage Highlighting:
    • 🟢 Green cells = Fully covered endpoints
    • 🔴 Red cells = Not covered endpoints
    • ⚪ Gray cells = Not defined in specification
  • Theme Support: Toggle between light and dark themes
  • Coverage Statistics: Key metrics dashboard showing total/covered endpoints and coverage percentage

🚀 Usage

# Generate heatmap visualization
swagger-coverage-cli api.yaml collection.json --heatmap --output heatmap.html

# Regular report (unchanged behavior)
swagger-coverage-cli api.yaml collection.json --output report.html

📸 Screenshots

Light Theme Matrix View:
Light Theme Heatmap

Dark Theme Support:
Dark Theme Heatmap

🔧 Implementation Details

  • New CLI Option: --heatmap flag with comprehensive help text
  • Conditional Report Generation: Automatically selects heatmap vs standard report based on flag
  • Interactive Features: Clickable matrix cells show detailed coverage information
  • Responsive Design: Modern Material Design styling that works across screen sizes
  • Backward Compatibility: All existing functionality preserved, no breaking changes

🧪 Testing

  • ✅ All existing tests continue to pass (91/91)
  • ✅ New comprehensive test suite for heatmap functionality (8 new tests)
  • ✅ CLI integration tests validating end-to-end behavior
  • ✅ Verified both heatmap and regular report generation

💡 Benefits

This visualization makes it significantly easier to:

  • Identify Coverage Gaps: Quickly spot which endpoints lack test coverage
  • Analyze Method Coverage: See which HTTP methods are well-tested vs neglected
  • Prioritize Testing Efforts: Visual indicators help focus on high-impact areas
  • Present Results: Professional, interactive reports suitable for stakeholder review

The heatmap complements the existing detailed HTML reports by providing an at-a-glance overview that's perfect for coverage analysis and gap identification in API testing workflows.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits September 16, 2025 17:39
Co-authored-by: dreamquality <130073078+dreamquality@users.noreply.github.com>
Co-authored-by: dreamquality <130073078+dreamquality@users.noreply.github.com>
Copilot AI changed the title [WIP] add a new report type driven by additional cli flag - coverage heatmap ( graph api (endpoints nodes methods edges) with coverage highlighting) Add coverage heatmap visualization with --heatmap CLI flag Sep 16, 2025
Copilot AI requested a review from dreamquality September 16, 2025 17:49
@dreamquality dreamquality added the invalid This doesn't seem right label Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants