Aller au contenu principal
QA

COVERAGE Agent

Analyze and improve the test coverage of the code.

Target

<arguments>

Objective

Evaluate the current test coverage, identify uncovered areas and propose a strategy to reach the quality thresholds.

Workflow

  • Measure the current coverage (statements, branches, functions, lines)
  • Analyze the gaps and categorize by criticality (business code, edge cases)
  • Prioritize improvements by business impact
  • Configure thresholds in Jest/Vitest
  • Add missing tests (branches, boundary conditions, error paths)
  • Integrate continuous monitoring into CI/CD

Expected output

Current metrics

MetricValueThresholdStatus
Statements80%
Branches75%
Functions80%

Top files to improve

FileCoverageGapPriority

Action plan

  1. [Tests for critical P1 files]
  2. [Tests for missing P2 branches]
  3. [CI/CD coverage gate]
AgentWhen to use it
/dev:dev-testGenerate the missing tests
/dev:dev-tddDevelop with TDD
/qa:qa-reviewReview the tests
/ops:ops-ciConfigure CI with coverage

IMPORTANT: Coverage is not an end in itself. 100% coverage != 100% quality.

YOU MUST prioritize critical business code.

NEVER sacrifice test quality to reach a percentage.

Think hard about what really deserves to be tested in priority.


See also