testing-strategy
Skill16 starsChanged 5 days agoMITView on GitHub
Test pyramid, coverage targets, and unit/integration/E2E patterns. TRIGGER when: planning tests, writing test code, or reviewing coverage. SKIP: quality-gate scoring of plans (use quality-validation); root-causing a failing test (use systematic-debugging); proving a fix works (use verification-before-completion).
54 other projects use a version of this.
Adopted by
Most recently taken up by
- jDxve/avengers-kittheir own version, first seen Nov 8, 2026
- nisarth/claude-skills-storetheir own version, first seen Nov 8, 2026
- ccoalm/ccl-skillstheir own version, first seen Nov 8, 2026
- bmsuisse/skillstheir own version, first seen Nov 6, 2026
- Cure-Consulting-Group/ProductEngineeringSkillstheir own version, first seen Nov 4, 2026
- CsHeng/agent-skillstheir own version, first seen Nov 4, 2026
Used with
Projects with it also use api-contract-design, deploy-checklist and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MohOneXSkillapi-contract-design
Designs and reviews API contracts (REST, RPC, GraphQL, library interfaces) for evolvability, backward compatibility, and failure semantics. Use when defining new endpoints/interfaces, versioning an API, reviewing a schema, or deciding how breaking changes propagate to clients.
Also in 3 projects that use this
AnthropicSkilldeploy-checklist
Pre-deployment verification checklist. Use when about to ship a release, deploying a change with database migrations or feature flags, verifying CI status and approvals before going to production, or documenting rollback triggers ahead of time.
Also in 4 projects that use this
AnthropicSkilltech-debt
Identify, categorize, and prioritize technical debt. Trigger with "tech debt", "technical debt audit", "what should we refactor", "code health", or when the user asks about code quality, refactoring priorities, or maintenance backlog.
Also in 4 projects that use this
Microsoft AzureSkillrelease-readiness
Complete ODIN release documentation and validation checks before declaring user-visible work complete, preparing a release, or opening the Release-to-main pull request.
Also in 3 projects that use this
MicrosoftSkilldeep-review
Multi-agent deep code review for regorus. Three diverse parallel discovery agents with context asymmetry, risk-triggered micro-passes, adversarial gap-finder, and verification with disproval mandates. Use for high-stakes changes.
Also in 3 projects that use this
- +4 more from anthropics
Other versions54 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 54
- anthropics/knowledge-work-plugins★ 35ksame name
- chthollyphile/folia-major★ 12ksame name
- Community-Access/accessibility-agents★ 409same name
- AnastasiyaW/claude-code-config★ 214same name
- AnastasiyaW/codex-claude-code-config★ 214same name
- irahardianto/awesome-agv★ 157same name
- Blushyes/reef★ 84same name
- shinpr/agentic-code★ 51same name
- addxai/enterprise-harness-engineering★ 44same name
- drafthq/draft★ 40same name
44 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository39 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-commsSkill
- agent-memorySkill
- api-designSkill
- context-engineeringSkill
- database-optimizationSkill
- distillSkill
- docker-templatesSkill
- error-handlingSkill
- frontend-designSkill
- github-actions-templateSkill
- git-operationsSkill
- logging-standardsSkill
- mcp-toolsSkill
- monitoring-observabilitySkill
- mui-stylingSkill
- necessity-firstSkill
- pattern-recognitionSkill
- planning-methodologySkill
- python-patternsSkill
- quality-validationSkill
- react-patternsSkill
- research-methodologySkill
- reverse-engineer-anythingSkill
- security-review-checklistsSkill
- semantic-memory-mcpSkill
- skill-authoringSkill
- sofa-searchSkill
- spec-designSkill
- spec-developSkill
- spec-researchSkill
- spec-reviewSkill
- spec-workflowSkill
- state-managementSkill
- systematic-debuggingSkill
- ui-ux-pro-maxSkill
- verification-before-completionSkill
- watch-patternsSkill
- worktree-managementSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 17 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 44 edited versions we read keep these.
17
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Never skip the red run - a test that never failed proves nothing.
- Distinctive: line 92
Test one thing per test
- Distinctive: line 132
Use test containers or in-memory DB
- Distinctive: line 136
Test full request/response cycle
- Distinctive: line 156
Test user perspective, not implementation
- Distinctive: line 157
Use stable selectors (data-testid)
- Distinctive: line 160
Use page object pattern
- Distinctive: line 181
Use realistic but fake data
- Distinctive: line 182
Never use production data
- Distinctive: line 184
Use faker libraries for variety
- Very specific: line 228
Test files: {module}_test.py or {module}.test.ts
- Distinctive: line 237
Unit tests: - Run on every commit
- Distinctive: line 238
Integration tests: - Run on PR/merge
- Distinctive: line 239
E2E tests: - Run on deploy to staging
- Distinctive: line 272
Write tests before fixing bugs
- Distinctive: line 273
Test behavior, not implementation
- Distinctive: line 274
Keep tests simple and readable
- Distinctive: line 280
Test private methods directly
“Common” is measured: kept by at least 6 in 10 of the 44 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Testing Strategy Skill
Purpose
Comprehensive testing guidelines including test pyramid, coverage targets, and test patterns.
Auto-Invoke Triggers
- Planning test strategy
- Writing unit/integration tests
- Reviewing test coverage
- Setting up test infrastructure
TDD Enforcement (Red -> Green -> Refactor)
For new behavior and bug fixes, the failing test comes first. No production code without a test that demanded it.
| Step | Do | Gate |
| 1. Red | Write one small test for the next behavior; run it | It fails for the expected reason (not a typo/import error) |
| 2. Green | Write the least code that passes | All tests pass; no extra behavior |
| 3. Refactor | Clean names, duplication, structure | Tests stay green; no new behavior |
Rules:
- Never skip the red run - a test that never failed proves nothing.
- One behavior per cycle; commit-sized steps, not feature-sized.
- Bug fix = reproduce with a failing test first, then fix (see
systematic-debuggingfor root-causing). - Code written before its test: delete it and restart from red, or add the test and confirm it fails when the code is reverted.
- Legitimate exceptions (UI layout, throwaway spikes, generated code): say so explicitly rather than silently skipping.
Evidence of compliance in a report: the failing test output, then the passing
output. Proving the final result is verification-before-completion's job.
Test Pyramid
/\
/ \ E2E Tests (10%)
/----\ - Critical user flows
/ \ - Slow, expensive
/--------\ Integration Tests (20%)
/ \ - API tests, DB tests
/------------\ - Medium speed
/ \ Unit Tests (70%)
/----------------\ - Fast, isolated
- Business logicDistribution Guidelines
| Type | Percentage | Focus |
| Unit | 70% | Business logic, utilities |
| Integration | 20% | API, database, services |
| E2E | 10% | Critical user journeys |
Coverage Targets
| Metric | Minimum | Target |
| Line coverage | 70% | 80% |
| Branch coverage | 60% | 70% |
| Critical paths | 90% | 100% |
What to Cover
- All public methods
- Business logic
- Edge cases
- Error handling
- Integration points
What NOT to Cover
- Generated code
- Simple getters/setters
- Framework code
- Third-party libraries
Unit Testing
Principles
- Test one thing per test
- Tests should be fast (< 100ms)
- Tests should be isolated
- Tests should be deterministic
- No external dependencies
AAA Pattern
Arrange - Set up test data and mocks
Act - Execute the method under test
Assert - Verify the expected outcomeNaming Convention
{Method}_{Scenario}_{ExpectedResult}
CreateUser_ValidData_ReturnsUserId
CreateUser_DuplicateEmail_ThrowsConflict
CalculateTotal_EmptyCart_ReturnsZeroTest Categories
| Category | Purpose | Example |
| Happy path | Normal operation | Valid user creation |
| Edge case | Boundary conditions | Empty input, max length |
| Error case | Failure scenarios | Invalid data, not found |
Integration Testing
Scope
- API endpoints
- Database operations
- External service calls
- Message queues
Best Practices
- Use test containers or in-memory DB
- Seed known test data
- Clean up after each test
- Mock external services
- Test full request/response cycle
API Test Checklist
- Correct status code
- Response body structure
- Headers (content-type, auth)
- Validation errors
- Authorization rules
E2E Testing
When to Use
- Critical user journeys
- Payment flows
- Authentication flows
- Multi-step workflows
Best Practices
- Test user perspective, not implementation
- Use stable selectors (data-testid)
- Handle async operations properly
- Keep tests independent
- Use page object pattern
Critical Paths to Test
- User registration/login
- Main feature workflow
- Payment/checkout
- Error recovery flows
Test Data Management
Strategies
| Strategy | Use Case |
| Fixtures | Static test data |
| Factories | Dynamic test data |
| Builders | Complex objects |
| Seeders | Database state |
Rules
- Use realistic but fake data
- Never use production data
- Reset state between tests
- Use faker libraries for variety
Mocking Guidelines
When to Mock
- External services (APIs, databases)
- Time-dependent operations
- Random values
- Expensive operations
When NOT to Mock
- Simple value objects
- The code under test
- Everything (over-mocking)
Mock Types
| Type | Purpose |
| Stub | Return canned responses |
| Mock | Verify interactions |
| Spy | Record calls, pass through |
| Fake | Simplified implementation |
Test Organization
File Structure
tests/
├── unit/
│ ├── services/
│ └── utils/
├── integration/
│ ├── api/
│ └── db/
├── e2e/
├── fixtures/
└── conftest.py / setup.tsNaming
- Test files:
{module}_test.pyor{module}.test.ts - Match source structure
- Group related tests in describe/class
CI/CD Integration
Pipeline Stages
- Unit tests - Run on every commit
- Integration tests - Run on PR/merge
- E2E tests - Run on deploy to staging
Quality Gates
| Gate | Requirement |
| Unit tests | 100% pass |
| Coverage | > 70% |
| Integration | 100% pass |
| E2E (critical) | 100% pass |
Performance Testing
Types
| Type | Purpose |
| Load | Expected traffic |
| Stress | Breaking point |
| Soak | Memory leaks |
| Spike | Sudden traffic |
Metrics to Measure
- Response time (p50, p95, p99)
- Throughput (requests/second)
- Error rate
- Resource usage
Best Practices
DO
- Write tests before fixing bugs
- Test behavior, not implementation
- Keep tests simple and readable
- Run tests frequently
- Maintain test code quality
- Use meaningful assertions
DON'T
- Test private methods directly
- Write flaky tests
- Skip tests temporarily (delete instead)
- Test external systems
- Ignore slow tests
- Copy-paste test code
Test Quality Checklist
- Tests are fast (< 10s for unit suite)
- Tests are isolated (no order dependency)
- Tests are deterministic (no flakiness)
- Tests are readable (clear intent)
- Tests cover edge cases
- Tests verify error handling
- Mocks are minimal and purposeful
- CI runs tests automatically
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

