Get the FREE Ultimate OpenClaw Setup Guide →

testing-strategy

npx machina-cli add skill anthropics/knowledge-work-plugins/testing-strategy --openclaw
Files (1)
SKILL.md
1.2 KB

Testing Strategy

Design effective testing strategies balancing coverage, speed, and maintenance.

Testing Pyramid

        /  E2E  \         Few, slow, high confidence
       / Integration \     Some, medium speed
      /    Unit Tests  \   Many, fast, focused

Strategy by Component Type

  • API endpoints: Unit tests for business logic, integration tests for HTTP layer, contract tests for consumers
  • Data pipelines: Input validation, transformation correctness, idempotency tests
  • Frontend: Component tests, interaction tests, visual regression, accessibility
  • Infrastructure: Smoke tests, chaos engineering, load tests

What to Cover

Focus on: business-critical paths, error handling, edge cases, security boundaries, data integrity.

Skip: trivial getters/setters, framework code, one-off scripts.

Output

Produce a test plan with: what to test, test type for each area, coverage targets, and example test cases. Identify gaps in existing coverage.

Source

git clone https://github.com/anthropics/knowledge-work-plugins/blob/main/engineering/skills/testing-strategy/SKILL.mdView on GitHub

Overview

Design robust testing strategies that balance coverage, speed, and maintainability. This skill uses the Testing Pyramid and component-type strategies to shape a plan, covering API, data pipelines, frontend, and infrastructure.

How This Skill Works

Begin by defining coverage goals aligned to business-critical paths, error handling, edge cases, security boundaries, and data integrity. Then apply the Testing Pyramid to determine appropriate test types (unit, integration, end-to-end) and use a Strategy by Component Type to scope tests for API endpoints, data pipelines, frontend, and infrastructure. The result is a formal test plan detailing what to test, the test type for each area, coverage targets, and identified gaps to close.

When to Use It

  • Starting a new project or feature to establish a testing approach
  • Revising an existing test strategy after architecture changes
  • Justifying test coverage and governance to stakeholders
  • Evaluating current test suites to identify gaps and redundancy
  • Implementing CI/CD with automated test coverage and reliability

Quick Start

  1. Step 1: Define business-critical paths and testing goals
  2. Step 2: Map tests by component type using the Testing Pyramid and the strategy guide
  3. Step 3: Produce the test plan with what to test, test types, coverage targets, and example cases

Best Practices

  • Anchor tests to business-critical paths and user flows
  • Follow the Testing Pyramid: many unit tests, fewer integration, few end-to-end
  • Explicitly cover error handling, edge cases, security boundaries, and data integrity
  • Document what to test and what to skip (avoiding trivial or framework-only code)
  • Regularly identify coverage gaps and quantify with measurable targets

Example Use Cases

  • API service: unit tests for business logic, integration tests for HTTP layer, contract tests for consumers
  • Data pipelines: input validation, transformation correctness, idempotency checks
  • Frontend: component tests, interaction tests, visual regression, accessibility
  • Infrastructure: smoke tests, chaos engineering experiments, load tests
  • New feature: end-to-end test plan mapping user journeys with coverage targets

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers