quality-coverage-report
Generate test coverage reports showing which code paths are tested. Use to identify untested code and improve test coverage.
- Category: discovered
- Tags: github, community
- Version: 1.0.0
- Author: walid
- Downloads: 0
- GitHub stars: 4
- Updated: 2025-11-21
Download the latest version (v1.0.0) from this page.
SKILL.md
---
name: quality-coverage-report
description: Generate test coverage reports showing which code paths are tested. Use to identify untested code and improve test coverage.
---
# Test Coverage Report Skill
Generate and analyze test coverage reports.
## When to Use
- After running tests
- Before creating PR
- Identifying untested code
- Improving test coverage
## Usage
### Python Coverage
```bash
# Run tests with coverage
pytest --cov=src --cov-report=html tests/
# View report
open htmlcov/index.html
# Terminal report
pytest --cov=src --cov-report=term-missing tests/
```text
### Mojo Coverage (Future)
```bash
# When Mojo coverage tools available
mojo test --coverage tests/
```text
## Coverage Metrics
### Line Coverage
Percentage of lines executed:
```text
src/module.mojo
Lines: 45/50 (90%)
Missing: 12, 18, 23, 35, 41
```text
### Branch Coverage
Percentage of decision branches taken:
```text
Branches: 8/10 (80%)
Missing branches: 12->15, 18->20
```text
## Coverage Goals
- **Minimum**: 80% line coverage
- **Target**: 90% line coverage
- **Critical paths**: 100% coverage
- **Edge cases**: Must be tested
## Coverage Report
```text
Coverage Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
File Lines Missing Coverage
────────────────────────────────────────────────
src/tensor.mojo 150 5 96.7%
src/nn.mojo 200 30 85.0%
src/utils.mojo 50 10 80.0%
────────────────────────────────────────────────
TOTAL 400 45 88.8%
Critical paths: 100% ✅
Minimum coverage: 80% ✅
Target coverage: 90% ❌
```text
## Improving Coverage
1. **Identify gaps**: Find uncovered lines
1. **Add tests**: Write tests for gaps
1. **Re-run**: Verify coverage improved
1. **Repeat**: Until targets met
## CI Integration
```yaml
- name: Test Coverage
run: |
pytest --cov=src --cov-report=xml
codecov -f coverage.xml
```text
See `phase-test-tdd` for test generation.