Agent skill · software engineering · daffy0208
Testing Strategist
Design and implement comprehensive testing strategies. Use when setting up tests, choosing test types, implementing TDD, or improving code quality. Covers unit tests, integration tests, E2E tests, test-driven development, and testing best practices.
Why this skill is useful
Provides specific testing strategies and examples for unit, integration, and E2E tests that enhance the AI's ability to implement effective testing practices.
What it needs
About 9k tokens when loaded. Last updated 2025-12-25. 33 stars on the source repository.
What this skill does
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 Why This Ratio? Unit tests: Fast feedback, pinpoint bugs precisely, easy to maintain Integration tests: Ensure components work together, catch interface issues E2E tests: Verify actual user flows, catch UI bugs, but slow and brittle --- Level 1: Unit Tests (70%) What to Test Test individual functions, components, or classes in isolation. Good candidates: ✅ Business logic functions (calculations, validation, transformations) ✅ Utility functions (formatDate, parseUrl, etc.) ✅ React components (rendering, props, state) ✅ Hooks (custom React hooks) ✅ Pure functions (same input = same output) Skip: ❌ Third-party libraries (assume they work) ❌ Framework internals (React, Next.js) ❌ Simple getters/setters with no logic Unit Test Examples Testing Business Logic (Jest + TypeScript) Testing React Components (Jest + React Testing Library) Testing Custom Hooks Unit Test Best Practices ✅ Do: Test behavior, not implementation Use descriptive test names (it should...) Follow AAA pattern: Arrange, Act, Assert Test edge cases (empty arrays, null, negative numbers) Keep tests simple and readable ❌ Don't: Test private methods directly Over-mock (makes tests brittle) Test framework internals Write tests that depend on other tests --- Level 2: Integration Tests (20%) What to Test Test multiple units working together - typically API routes, database operations, or service integrations. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills daffy0208/testing-strategist