AgentSkillsCN

test-design

为新功能或变更设计测试计划与测试用例,全面覆盖边界条件、异常场景,以及单元测试、集成测试与端到端测试的不同层级。当您被要求在任意仓库中编写测试,或制定测试计划时,本指南将为您提供专业指导。

SKILL.md
--- frontmatter
name: test-design
description: "Design test plans and test cases for new features or changes, covering boundaries, error cases, and levels (unit/integration/e2e). Use when asked to write tests or create a test plan in any repo."

Test Design

Overview

Translate requirements into a compact test plan and concrete cases that minimize regression risk.

Workflow

1) Clarify behavior

  • Confirm acceptance criteria and non-goals.
  • Identify inputs, outputs, and side effects.

2) Identify test levels

  • Choose unit, integration, or e2e coverage based on risk and scope.
  • Prefer the smallest effective level.

3) Enumerate cases

  • Happy path
  • Boundary conditions
  • Invalid inputs and error handling
  • State transitions and idempotency
  • Performance or rate limits if relevant

4) Map to tests

  • Group cases into test files/suites.
  • Suggest fixtures and data builders.

Output template (adapt as needed)

  • Acceptance criteria recap
  • Test plan (levels + rationale)
  • Test cases list
  • Fixtures/data needs