Back to Skills

testing-strategy

verified

Comprehensive test architecture, coverage strategy, and test design beyond API testing. Covers test pyramid design, frontend/component testing (React Testing Library, Vue Test Utils), E2E testing (Playwright, Cypress), visual regression, mocking strategies (MSW), and flaky test prevention. Use this skill when designing test architecture, determining what test type to use, setting up component or E2E testing, debugging flaky tests, reviewing coverage strategy, or organizing test files. Triggers on "test strategy", "what to test", "coverage", "e2e", "playwright", "cypress", "component test", "flaky test", "test pyramid".

View on GitHub

Marketplace

pokayokay

srstomp/pokayokay

Plugin

pokayokay

productivity

Repository

srstomp/pokayokay
2stars

plugins/pokayokay/skills/testing-strategy/SKILL.md

Last Verified

January 23, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/srstomp/pokayokay/blob/main/plugins/pokayokay/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

Comprehensive testing guidance for test architecture, coverage strategy, and test design.

## Test Pyramid

```
                    ▲
                   ╱ ╲   E2E Tests
                  ╱───╲  (5-10% of tests)
                 ╱     ╲  Real browser, full stack
                ╱───────╲
               ╱         ╲  Integration Tests
              ╱───────────╲  (15-25% of tests)
             ╱             ╲  Multiple units, real dependencies
            ╱───────────────╲
           ╱                 ╲  Unit Tests
          ╱───────────────────╲  (65-80% of tests)
         ╱                     ╲  Single units, isolated, fast
```

| Level | Speed | Cost | Confidence | Isolation |
|-------|-------|------|------------|-----------|
| **Unit** | ~1ms | Low | Narrow | High |
| **Integration** | ~100ms | Medium | Medium | Medium |
| **E2E** | ~1-10s | High | High | Low |

### When to Deviate

Invert the pyramid when:
- **Legacy code without unit tests** → Start with E2E for safety net, add units as you refactor
- **Highly integrated systems** → More integration tests, fewer isolated units
- **Critical user journeys** → Extra E2E coverage for checkout, auth, payments
- **UI-heavy apps** → More component/visual tests, fewer traditional units

## Decision Framework

**What test type should I write?**

```
Is it a pure function or utility?
  └─ YES → Unit test
  └─ NO ↓

Does it involve UI rendering?
  └─ YES → Component test (RTL/Vue Test Utils)
  └─ NO ↓

Does it cross system boundaries (DB, API, services)?
  └─ YES → Integration test
  └─ NO ↓

Is it a critical user flow spanning multiple pages?
  └─ YES → E2E test (Playwright/Cypress)
  └─ NO → Unit or integration test
```

**What NOT to test:**

- Framework internals (React hooks work, Next.js routing works)
- Third-party libraries (axios sends requests correctly)
- Implementation details (which internal method was called)
- Styling (unless visual regression is set up)
- Trivial code (getters, setters, 

Validation Details

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