Test planning and coverage strategy workflow. Use when designing test suites,
establishing coverage targets, planning TDD approaches, or assessing
testing gaps in existing codebases.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Test planning and coverage strategy workflow. Use when designing test suites,
establishing coverage targets, planning TDD approaches, or assessing
testing gaps in existing codebases.
## Sprint 1: Critical Path (2 weeks)### Goals- Achieve 90% coverage on authentication
- Achieve 90% coverage on payments
- Add 5 E2E tests for critical paths
### Tasks1. Unit tests for auth module (20 tests)
2. Unit tests for payment module (15 tests)
3. Integration tests for auth API (5 tests)
4. E2E test: Complete checkout (1 test)
5. E2E test: Login flow (1 test)
### Expected Outcome- Overall coverage: 55% → 65%
- Critical path coverage: 59% → 90%
7.2 Test Writing Guidelines
Test Structure:
describe('Module or Function', () => {
// SetupbeforeEach(() => {
// Reset state
});
describe('method or scenario', () => {
it('should [expected behavior] when [condition]', () => {
// Arrangeconst input = createTestInput();
// Actconst result = functionUnderTest(input);
// Assertexpect(result).toEqual(expectedOutput);
});
});
});
Naming Convention:
should [expected behavior] when [condition]
Examples:
- should return user when valid ID provided
- should throw error when user not found
- should update timestamp when saving
7.3 Coverage Tracking
Track coverage weekly:
Week
Overall
Business
Critical
Tests Added
1
55%
62%
59%
+15
2
62%
75%
78%
+22
3
68%
82%
88%
+18
4
72%
85%
92%
+12
Quick Reference
Coverage Commands
# Node.js
npm test -- --coverage --coverageReporters=text-summary
# Python
pytest --cov=src --cov-report=term-missing
# Go
go test -cover ./... | grep -E "coverage:"# Rust
cargo tarpaulin --out Stdout
Test Templates
Unit Test:
describe('functionName', () => {
it('should [behavior] when [condition]', () => {
const result = functionName(input);
expect(result).toEqual(expected);
});
});