ferroxlabs/wayland/test-strategy-design

Claude Code and agent skill by ferroxlabs/wayland

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Guides expert-level test strategy design implementation: architecture and best-practices decision frameworks, production-ready patterns, and concrete templates for test strategy design workflows. Use when the user asks about test strategy design, test strategy design configuration, or testing best practices for test projects. Do NOT use when the user needs a different testing quality capability -- check sibling skills in the testing quality subcategory.

Install

npx vskill@latest install ferroxlabs/wayland/test-strategy-design

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as ferroxlabs/wayland/test-strategy-design.

Test Strategy Design

When to Use

Use this skill when:

  • A user is starting a new project and needs to decide which test types to invest in, at what proportions, and using which tools
  • A user has an existing test suite that is slow, flaky, or providing low confidence and needs a structural overhaul
  • A user asks how to balance unit, integration, end-to-end, contract, performance, or security tests for a specific architecture (microservices, monolith, event-driven, etc.)
  • A user needs to define testing standards across a team or organization, including naming conventions, coverage targets, CI gating rules, and ownership boundaries
  • A user is migrating from one testing approach to another (e.g., heavy end-to-end suites to a pyramid model, or from manual QA gates to shift-left automated testing)
  • A user needs to define test strategy for a specific system type: REST API, GraphQL service, frontend SPA, mobile app, data pipeline, machine learning model, or embedded system
  • A user asks about test coverage targets, mutation testing thresholds, or how to measure test suite quality
  • A user wants to implement risk-based testing -- prioritizing test effort proportional to business risk, change frequency, and failure impact

Do NOT use this skill when:

  • The user needs help writing a specific unit test or debugging a failing test -- use the test-writing or test-debugging skills instead
  • The user needs guidance on a specific testing framework configuration (Jest, pytest, Cypress setup) -- use the framework-specific skill
  • The user is asking about load testing tool selection or performance benchmarking design -- use the performance-testing skill
  • The user needs accessibility testing (WCAG compliance, screen reader testing) -- use the accessibility-testing skill
  • The user is asking about security penetration testing or SAST/DAST toolchain setup -- use the security-testing skill
  • The user needs QA process design (bug triage workflows, release gates, defect SLAs) -- use the qa-process skill

Process

1. Establish System Context and Risk Profile

Before recommending any test approach, characterize the system fully:

  • Identify the architecture pattern: monolith, microservices, event-driven, serverless, data pipeline, frontend SPA, mobile, or hybrid. Each has dramatically different testing gravity centers -- microservices demand contract testing; event-driven systems require message/event verification; SPAs require real browser DOM testing.
  • Map the failure cost matrix: For each major system component, classify failures as (a) data loss or corruption, (b) security breach, (c) revenue loss, (d) degraded UX, or (e) operational noise. High-cost failures require higher test fidelity and coverage depth.
  • Assess change velocity: Components touched weekly need faster feedback loops (unit-heavy, sub-5-minute CI) than components touched monthly (where broader integration coverage is acceptable with slower runs).
  • Identify external dependencies: Third-party APIs, databases, queues, auth providers, payment processors. Each external dependency is a contract that must be tested at its boundary, not through live calls in most test types.
  • Determine team size and structure: Teams under 5 engineers should favor pragmatic pyramid approaches with minimal tooling overhead. Teams above 20 often need explicit ownership boundaries and parallelized test execution infrastructure.
2. Choose a Test Distribution Model

Select the distribution model that fits the architecture and risk profile -- do not default to the classic pyramid without evaluating fit:

  • Testing Pyramid (70/20/10 rule): 70% unit, 20% integration, 10% end-to-end. Best for: backend services with clear domain logic, libraries, CLI tools, data transformation pipelines. Gives fast feedback, high isolation, easy debugging. Fails when the value is in integration behavior (e.g., database query correctness, API contract adherence).
  • Testing Trophy (Kent C. Dodds model): Heavy emphasis on integration tests with a moderate unit layer and a small E2E layer. Best for: React/frontend applications, full-stack JavaScript, REST APIs where database and HTTP layer correctness matters more than isolated function behavior. Integration tests here mean "render a component with real state management" or "test the HTTP handler with a real database transaction."
  • Testing Honeycomb (Spotify model): Unit tests are minimal; the bulk is integration tests at the service boundary; E2E tests cover only critical user journeys. Best for: microservices architectures where business logic is thin in individual services and value is in service collaboration.
  • Contract-First Testing: Used alongside any of the above when multiple services consume shared APIs. Pact or OpenAPI schema validation becomes a first-class layer.
  • Risk-Based Testing: Allocate test depth proportional to a component's risk score: Risk Score = (Probability of Failure) × (Business Impact) × (Change Frequency). Score each component 1--5 on each dimension. Components scoring above 30 get full coverage; 15--30 get targeted coverage; below 15 get smoke tests only.
3. Define Test Layers and Boundaries

For each layer, define precisely what it covers, what it does NOT cover, and what makes a test belong to that layer:

  • Unit tests: Test a single function, class, or module in complete isolation. All I/O (database, network, filesystem, time, random) is replaced with deterministic fakes or stubs. Execution time per test: under 10ms. Suite execution time: under 60 seconds total for most codebases. Coverage target: 80--90% for domain logic modules; 60--70% for infrastructure/glue code.
  • Integration tests: Test the interaction between two or more real components. The database connection is real (use a test database or ephemeral container); the HTTP client is real; but external third-party services are stubbed at the network layer (WireMock, msw, VCR cassettes). Execution time per test: under 500ms. Suite execution time: under 10 minutes.
  • Contract tests (consumer-driven): Verify that the interface between two services matches the agreed contract. Consumer defines expectations using Pact or similar; provider verifies against those expectations in CI. Run on every PR that touches an API boundary. Execution time: under 2 minutes.
  • End-to-end tests: Drive the application through a real browser or API client against a deployed environment with all dependencies running. Cover only the highest-value user journeys -- login, checkout, core CRUD, critical dashboards. Target 10--20 scenarios maximum. Execution time: under 15 minutes total. Flakiness tolerance: zero -- any flaky E2E test is immediately quarantined.
  • Component tests (for microservices): A middle layer that tests a single service in isolation using containerized dependencies (real database, real cache) but with all external service calls mocked. More valuable than unit tests for thin services, more reliable than E2E.
4. Define Coverage Targets and Quality Gates

Coverage numbers alone are meaningless -- define them by layer and by module type:

  • Domain/business logic: 85% line coverage minimum; 70% branch coverage minimum; mutation score above 60% (use Stryker for JS/TS, PIT for Java, mutmut for Python).
  • API handlers/controllers: 80% line coverage; every HTTP status code path tested; every validation error path tested.
  • Infrastructure/adapters: 70% line coverage; focus on error paths (connection failure, timeout, malformed response).
  • UI components: 80% render coverage with React Testing Library or equivalent; all user interaction paths (click, submit, keyboard navigation) tested.
  • Utility/helper functions: 90%+ -- these are easiest to test exhaustively and regressions here are silent and painful.
  • Generated code: Exempt from coverage requirements -- generated code should not inflate or deflate metrics.
  • CI gate configuration: Block PRs when coverage drops more than 2% below baseline. Do not require 100% coverage -- this incentivizes trivial tests and discourages refactoring.
5. Design the Test Execution Architecture

The strategy is only as good as its execution infrastructure:

  • Local developer loop: Unit and integration tests must run in under 2 minutes locally. Provide a make test-unit and make test-integration target or equivalent. Developers must be able to run the full relevant suite before pushing.
  • Pre-commit hooks: Run linting, type checking, and the fastest unit tests (under 30 seconds) via pre-commit or Husky. Never run slow integration tests pre-commit -- this kills developer velocity.
  • CI pipeline stages: Structure as: (1) lint + type check (2--3 min), (2) unit tests (3--5 min), (3) integration tests with service containers (5--10 min), (4) contract tests (2 min), (5) E2E tests on deployed preview environment (10--15 min). Stages 1--3 run in parallel where possible.
  • Test parallelization: Split test files across workers using Jest --runInBand disabled, pytest-xdist -n auto, or Go's native parallel execution. For integration tests, use isolated database schemas or transactions that roll back after each test -- never share mutable state between parallel test workers.
  • Test result reporting: Publish JUnit XML or equivalent to CI for trend analysis. Track flakiness rate per test (any test failing more than 2% of runs on green code is flaky and must be fixed or quarantined). Use test impact analysis (Nx affected, Jest --onlyChanged) to run only tests affected by changed files on feature branches.
  • Environment parity: Integration tests must run against the same database engine version (PostgreSQL 15, not SQLite) and message broker as production. Use Docker Compose or Testcontainers for ephemeral infrastructure. Never test against a shared staging database.
6. Define Test Data Management Strategy

Poor test data management is the most common cause of flaky, unreliable test suites:

  • Unit tests: All data is inline in the test file. No shared fixtures. Each test constructs exactly the data it needs to prove its assertion. Use builder patterns or factory functions (FactoryBot in Ruby, factory-boy in Python, fishery in JS) to construct test objects with sensible defaults and minimal required overrides.
  • Integration tests: Use database seeders or fixture loaders that run before each test suite and roll back via transactions. Each test must be independent -- never rely on data created by a previous test in the same suite.
  • E2E tests: Use API seeding endpoints or database seeds to set up known state before each scenario. Never scrape or reuse state from a previous test run. Maintain a set of dedicated test accounts (e.g., test-buyer@example.com, test-admin@example.com) with deterministic initial state.
  • Sensitive data: Never use production data in tests. Generate realistic but fake data with Faker libraries. For regulated industries, document that test data does not contain PII.
  • Data volume: Most integration tests should use minimal data (1--5 records) to stay fast. Performance tests use data volume calibrated to production scale. Never run performance tests against a nearly-empty database -- query plans differ significantly with small vs. large tables.
7. Establish Test Ownership and Maintenance Culture

A test strategy that nobody maintains is worse than no strategy:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
608
Repository forks
113
7-day trend score
37

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ferroxlabs/wayland/test-strategy-design/badge)](https://verified-skill.com/skills/ferroxlabs/wayland/test-strategy-design)

Something wrong with this skill or its page? Tell us.