From scaffolding
Guides test pyramid structure, coverage targets, and patterns for unit, integration, and E2E tests. Includes AAA pattern, naming conventions, and API test checklist.
How this skill is triggered — by the user, by Claude, or both
Slash command
/scaffolding:testing-strategyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Comprehensive testing guidelines including test pyramid, coverage targets, and test patterns.
Comprehensive testing guidelines including test pyramid, coverage targets, and test patterns.
/\
/ \ E2E Tests (10%)
/----\ - Critical user flows
/ \ - Slow, expensive
/--------\ Integration Tests (20%)
/ \ - API tests, DB tests
/------------\ - Medium speed
/ \ Unit Tests (70%)
/----------------\ - Fast, isolated
- Business logic
| Type | Percentage | Focus |
|---|---|---|
| Unit | 70% | Business logic, utilities |
| Integration | 20% | API, database, services |
| E2E | 10% | Critical user journeys |
| Metric | Minimum | Target |
|---|---|---|
| Line coverage | 70% | 80% |
| Branch coverage | 60% | 70% |
| Critical paths | 90% | 100% |
Arrange - Set up test data and mocks
Act - Execute the method under test
Assert - Verify the expected outcome
{Method}_{Scenario}_{ExpectedResult}
CreateUser_ValidData_ReturnsUserId
CreateUser_DuplicateEmail_ThrowsConflict
CalculateTotal_EmptyCart_ReturnsZero
| 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 |
| Strategy | Use Case |
|---|---|
| Fixtures | Static test data |
| Factories | Dynamic test data |
| Builders | Complex objects |
| Seeders | Database state |
| Type | Purpose |
|---|---|
| Stub | Return canned responses |
| Mock | Verify interactions |
| Spy | Record calls, pass through |
| Fake | Simplified implementation |
tests/
├── unit/
│ ├── services/
│ └── utils/
├── integration/
│ ├── api/
│ └── db/
├── e2e/
├── fixtures/
└── conftest.py / setup.ts
{module}_test.py or {module}.test.ts| Gate | Requirement |
|---|---|
| Unit tests | 100% pass |
| Coverage | > 70% |
| Integration | 100% pass |
| E2E (critical) | 100% pass |
| Type | Purpose |
|---|---|
| Load | Expected traffic |
| Stress | Breaking point |
| Soak | Memory leaks |
| Spike | Sudden traffic |
npx claudepluginhub komluk/scaffolding --plugin scaffoldingCreate testing pyramid with unit/integration/E2E strategy. Define coverage targets and high-risk testing. Use when planning tests for features.
Use when writing tests, designing test strategy, or reviewing test coverage. Covers test pyramid, naming, mocking, and flaky test policy.
Provides test design patterns, coverage strategies (80-100% targets), types (unit/integration/E2E), organization, and best practices for comprehensive test suites. Use for new suites, coverage improvement, or test design.