Testing Strategist
Testing Strategist helps you build a structured testing approach grounded in the testing pyramid—70% unit tests, 20% integration tests, 10% E2E tests. It covers practical implementation across business logic, React components, hooks, API routes, and database operations, plus test-driven development principles to ship with confidence.
Testing Strategist helps you design and implement comprehensive testing strategies using the testing pyramid framework.
AI-generated summary based on this skill's SKILL.md
Install
daffy0208/ai-dev-standards/testing-strategist · repository language: TypeScript
git clone https://github.com/daffy0208/ai-dev-standards
cp -r ai-dev-standards/skills/testing-strategist ~/.claude/skills/testing-strategistnpx skillfed install daffy0208/ai-dev-standards/testing-strategistFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What is the testing pyramid and how should Testing Strategist help me apply it?
Testing Strategist guides you through the testing pyramid: 70% unit tests, 20% integration tests, 10% E2E tests. This structure balances speed, cost, and confidence. Unit tests verify individual functions and components quickly. Integration tests validate how modules work together—especially critical for API endpoints and database operations. E2E tests with Playwright confirm real user workflows. Testing Strategist helps you choose the right test type for each scenario and implement them across business logic, React components, hooks, and API routes.
How do I write tests before code using the TDD red-green-refactor cycle?
Testing Strategist teaches test-driven development by walking you through the red-green-refactor cycle. First, write a failing test (red) that describes the desired behavior. Then write minimal code to make it pass (green). Finally, refactor both test and implementation for clarity and maintainability (refactor). This approach ensures your code is testable from the start, reduces bugs, and creates living documentation. Testing Strategist provides TDD tutorials and examples for React components, async patterns, and business logic.
What are the best practices for the testing pyramid and structuring tests?
Testing Strategist emphasizes organizing tests by the pyramid: keep unit tests fast and isolated, use mocks for external dependencies, and group tests by feature or module. For integration tests, mock only external services while testing real interactions between your components. E2E tests should cover critical user journeys. Testing Strategist recommends clear file structure—colocating tests near source files or in a dedicated test directory—and setting Jest coverage thresholds to maintain quality as your project grows.
How do I set up Jest, React Testing Library, and Playwright for my project?
Testing Strategist walks you through configuring each tool. Jest handles unit and integration tests with coverage reporting and configurable thresholds. React Testing Library focuses on testing components as users interact with them, avoiding implementation details. Playwright automates E2E testing across browsers. Testing Strategist provides setup guides for Next.js projects, shows how to configure Jest coverage thresholds, and explains when to use mocks for external APIs versus real test doubles.
How can Testing Strategist help me improve code coverage and fix flaky tests?
Testing Strategist helps identify gaps in coverage by analyzing which code paths lack tests and recommends which scenarios to prioritize. It guides you toward realistic coverage targets and explains how to test async code patterns, form interactions, and edge cases. For flaky tests, Testing Strategist teaches debugging techniques: isolate test dependencies, avoid timing assumptions, use proper async/await patterns, and ensure mocks are reset between tests. Structured testing practices eliminate most flakiness.
What's the difference between unit, integration, and E2E tests in Testing Strategist?
Testing Strategist clarifies each layer: unit tests verify single functions or components in isolation using mocks—fast and focused. Integration tests validate how multiple modules interact, like testing React components with real hooks or API endpoints with databases. E2E tests with Playwright simulate real users navigating your app across browsers—slow but highest confidence. Testing Strategist helps you choose the right balance: prioritize unit tests for speed, use integration tests for critical workflows, and E2E tests for user-facing features.
SKILL.md
rendered from the published skill — quoted content, verbatim
Testing Strategist
Test the right things at the right level - write tests that give you confidence to ship.
Core Principle
The Testing Pyramid: 70% unit tests, 20% integration tests, 10% E2E tests.
Tests should be:
- Fast - Run in milliseconds (unit) to seconds (integration) to minutes (E2E)
- Isolated - Test one thing at a time
- Repeatable - Same input = same output
- Self-checking - Pass/fail automatically, no manual verification
- Timely - Written alongside code (or before, with TDD)
The Testing Pyramid
``` /\ / \ E2E Tests (10%) /----\ - Slow, brittle, expensive / \ - Test critical user journeys /--------\ - Example: "User can complete checkout" / \ /------------\ Integration Tests (20%) / \ - Medium speed,
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 3 files
skills/testing-strategist/README.md
skills/testing-strategist/SKILL.md
skills/testing-strategist/manifest.yaml