Test Coverage Matrix Block
Track test coverage across components with unit, integration, E2E, and manual test counts plus line and branch coverage metrics.
The Test Coverage Matrix block provides a complete view of test coverage across system components. It tracks different test types (unit, integration, E2E, manual), line and branch coverage percentages, and highlights components that meet or miss coverage targets.
When to Use
Block Properties
| Property | Required | Description |
|---|---|---|
| Name | Yes | Coverage matrix title |
| Description | No | Scope and purpose |
| Project ID | No | Associated project identifier |
| Target Coverage | No | Minimum acceptable coverage percentage |
| Coverage Entries | No | Per-component metrics |
| Owner | No | Person or team responsible |
| Last Updated | No | Date of last update |
Coverage Entry Properties
| Property | Required | Description |
|---|---|---|
| Component Name | Yes | Module or service name |
| Unit Tests | No | Count of unit tests |
| Integration Tests | No | Count of integration tests |
| E2E Tests | No | Count of end-to-end tests |
| Manual Tests | No | Count of manual test cases |
| Line Coverage | No | Percentage of lines covered |
| Branch Coverage | No | Percentage of branches covered |
| Status | No | Coverage health indicator |
| Notes | No | Additional context |
Coverage Status
Example: Microservices Coverage
Test coverage tracking for a microservices architecture.
Example: Frontend Components
Coverage tracking for a component library.
Summary Statistics
The block automatically calculates:
Best Practices
| Practice | Description |
|---|---|
| Realistic Targets | Set realistic target coverage based on component criticality |
| Branch Coverage Priority | Prioritise branch coverage for complex business logic |
| Track All Types | Track both automated and manual tests for complete picture |
| Regular Updates | Update coverage metrics after each test run |
| Visual Assessment | Use status indicators for quick visual assessment |
| Document Gaps | Add notes explaining coverage gaps or testing strategy |
| Trend Analysis | Review coverage trends over time, not just snapshots |
| Meaningful Tests | Focus on meaningful tests over coverage percentages |
| Complexity Consideration | Consider code complexity when setting targets |