Design optimal test pyramids with unit/integration/E2E ratios. Identify anti-patterns and recommend architecture-specific testing strategies.
View on GitHubmelodic-software/claude-code-plugins
test-strategy
plugins/test-strategy/skills/test-pyramid-design/SKILL.md
January 21, 2026
Select agents to install to:
npx add-skill https://github.com/melodic-software/claude-code-plugins/blob/main/plugins/test-strategy/skills/test-pyramid-design/SKILL.md -a claude-code --skill test-pyramid-designInstallation paths:
.claude/skills/test-pyramid-design/# Test Pyramid Design
## When to Use This Skill
Use this skill when:
- **Test Pyramid Design tasks** - Working on design optimal test pyramids with unit/integration/e2e ratios. identify anti-patterns and recommend architecture-specific testing strategies
- **Planning or design** - Need guidance on Test Pyramid Design approaches
- **Best practices** - Want to follow established patterns and standards
## Overview
The Test Pyramid, introduced by Mike Cohn, visualizes the ideal distribution of tests across different levels. More granular tests at the bottom (fast, cheap) and fewer broad tests at the top (slow, expensive).
## The Classic Test Pyramid
```text
┌───────┐
/ E2E \ ~10%
/ Tests \ (UI, Acceptance)
/─────────────\
/ Integration \ ~20%
/ Tests \ (API, Component)
/───────────────────\
/ Unit Tests \ ~70%
/ (Fast, Cheap) \ (Methods, Classes)
└─────────────────────────┘
```
## Test Level Characteristics
| Level | Speed | Cost | Scope | Confidence | Maintenance |
|-------|-------|------|-------|------------|-------------|
| Unit | Fastest (ms) | Lowest | Single unit | Low | Low |
| Integration | Medium (s) | Medium | Components | Medium | Medium |
| E2E | Slowest (min) | Highest | Full system | High | High |
## Common Pyramid Shapes
### Healthy Pyramid ✅
```text
/\ Unit: 70%+
/ \ Integration: 20%
/ \ E2E: 10%
/ \
/________\ Fast feedback, low maintenance
```
**Characteristics**:
- Fast CI/CD pipeline
- Quick feedback loop
- Low flakiness
- Easy maintenance
### Ice Cream Cone ❌
```text
██████████ E2E: 60%
████████ Integration: 30%
████ Unit: 10%
```
**Problems**:
- Slow pipelines (hours)
- Flaky tests
- Expensive maintenance
- Late feedback
**Fix**: Extr