Comprehensive testing strategies including test pyramid, TDD methodology, testing patterns, coverage goals, and CI/CD integration. Use when writing tests, implementing TDD, reviewing test coverage, debugging test failures, or setting up testing infrastructure.
View on GitHubwebdevtodayjason/titanium-plugins
titanium-toolkit
January 21, 2026
Select agents to install to:
npx add-skill https://github.com/webdevtodayjason/titanium-plugins/blob/main/plugins/titanium-toolkit/skills/testing-strategy/SKILL.md -a claude-code --skill testing-strategyInstallation paths:
.claude/skills/testing-strategy/# Testing Strategy
This skill provides comprehensive guidance for implementing effective testing strategies across your entire application stack.
## Test Pyramid
### The Testing Hierarchy
```
/\
/ \
/E2E \ 10% - End-to-End Tests (slowest, most expensive)
/______\
/ \
/Integration\ 20% - Integration Tests (medium speed/cost)
/____________\
/ \
/ Unit Tests \ 70% - Unit Tests (fast, cheap, focused)
/__________________\
```
**Rationale**:
- **70% Unit Tests**: Fast, isolated, catch bugs early
- **20% Integration Tests**: Test component interactions
- **10% E2E Tests**: Test critical user journeys
### Why This Distribution?
**Unit tests are cheap**:
- Run in milliseconds
- No external dependencies
- Easy to debug
- High code coverage per test
**Integration tests are moderate**:
- Test real interactions
- Catch integration bugs
- Slower than unit tests
- More complex setup
**E2E tests are expensive**:
- Test entire system
- Catch UX issues
- Very slow (seconds/minutes)
- Brittle and hard to maintain
## TDD (Test-Driven Development)
### Red-Green-Refactor Cycle
**1. Red - Write a failing test**:
```typescript
describe('Calculator', () => {
test('adds two numbers', () => {
const calculator = new Calculator();
expect(calculator.add(2, 3)).toBe(5); // FAILS - method doesn't exist
});
});
```
**2. Green - Write minimal code to pass**:
```typescript
class Calculator {
add(a: number, b: number): number {
return a + b; // Simplest implementation
}
}
// Test now PASSES
```
**3. Refactor - Improve the code**:
```typescript
class Calculator {
add(a: number, b: number): number {
// Add validation
if (!Number.isFinite(a) || !Number.isFinite(b)) {
throw new Error('Arguments must be finite numbers');
}
return a + b;
}
}
```
### TDD Benefits
**Design benefits**:
- Forces you to think about API before implementation
- Leads to more testable, modular code
- Enc