---
id: daily-testing-strategy
name: "testing-strategy"
url: https://skills.yangsir.net/skill/daily-testing-strategy
author: anthropics
domain: testing
tags: ["test-strategy", "test-pyramid", "coverage", "test-planning"]
install_count: 6400
rating: 4.50 (20 reviews)
github: https://github.com/anthropics/knowledge-work-plugins
---

# testing-strategy

> 设计平衡覆盖率、执行速度和维护成本的测试策略，基于测试金字塔方法论

**Stats**: 6,400 installs · 4.5/5 (20 reviews)

## Before / After 对比

### 测试策略设计

**Before**:

测试编写随意无规划，端到端测试过多导致执行缓慢，单元测试覆盖不足，维护成本高昂，测试套件逐渐成为开发瓶颈

**After**:

基于测试金字塔合理分配各层测试比例，平衡覆盖率与执行速度，明确每类测试的职责边界，测试套件高效且易维护

| Metric | Before | After | Change |
|---|---|---|---|
| 测试执行时间 | 30min | 10min | -67% |

## Readme

# testing-strategy

# 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.
Weekly Installs205Repository[anthropics/know…-plugins](https://github.com/anthropics/knowledge-work-plugins)GitHub Stars9.9KFirst SeenFeb 24, 2026Security Audits[Gen Agent Trust HubPass](/anthropics/knowledge-work-plugins/testing-strategy/security/agent-trust-hub)[SocketPass](/anthropics/knowledge-work-plugins/testing-strategy/security/socket)[SnykPass](/anthropics/knowledge-work-plugins/testing-strategy/security/snyk)Installed oncodex191opencode191gemini-cli190cursor189github-copilot189amp188

---
*Source: https://skills.yangsir.net/skill/daily-testing-strategy*
*Markdown mirror: https://skills.yangsir.net/api/skill/daily-testing-strategy/markdown*