Back to Skills

testing-strategy

verified

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 GitHub

Marketplace

titanium-plugins

webdevtodayjason/titanium-plugins

Plugin

titanium-toolkit

Repository

webdevtodayjason/titanium-plugins
5stars

plugins/titanium-toolkit/skills/testing-strategy/SKILL.md

Last Verified

January 21, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/webdevtodayjason/titanium-plugins/blob/main/plugins/titanium-toolkit/skills/testing-strategy/SKILL.md -a claude-code --skill testing-strategy

Installation paths:

Claude
.claude/skills/testing-strategy/
Powered by add-skill CLI

Instructions

# 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

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
19057 chars