一键导入
test-cases
Load when turning PRDs, requirements, acceptance criteria, sprint scope, or feature specs into structured test cases and coverage matrices.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Load when turning PRDs, requirements, acceptance criteria, sprint scope, or feature specs into structured test cases and coverage matrices.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Load when backend API work touches authentication, authorization, rate limiting, CORS, input validation, public endpoints, or security remediation in Mandate402.
Load when architecture choices, ADRs, trade-off evaluation, technical debt, or pattern selection need explicit decision records for Mandate402.
Load when designing or reviewing backend systems, APIs, auth, databases, security, performance, scalability, CI/CD, monitoring, or production runtime patterns.
Load when reviewing Mandate402 code for secrets, auth, authorization, input validation, payment safety, blockchain integration, or release security risks.
Load when testing Cloudflare Workers, Vitest worker pools, binding mocks, integration tests, coverage, or worker test failures.
Load when planning or building React/Next.js UI with CO-STAR structure, design tokens, dashboards, hero sections, or custom UI prompts.
| name | test-cases |
| description | Load when turning PRDs, requirements, acceptance criteria, sprint scope, or feature specs into structured test cases and coverage matrices. |
| license | MIT |
This skill generates comprehensive, requirement-driven test cases from PRD documents or user requirements.
Transform product requirements into structured test cases that ensure complete coverage of functionality, edge cases, error scenarios, and state transitions. The skill follows a pragmatic testing philosophy: test what matters, ensure every requirement has corresponding test coverage, and maintain test quality over quantity.
Trigger this skill when:
Follow these principles when generating test cases:
First, identify the source of requirements:
Analyze requirements and extract test scenarios:
For each requirement, identify:
Organize test cases using this structure:
# Test Cases: [Feature Name]
## Overview
- **Feature**: [Feature name]
- **Requirements Source**: [PRD file path or description]
- **Test Coverage**: [Summary of what's covered]
- **Last Updated**: [Date]
## Test Case Categories
### 1. Functional Tests
Test cases covering normal user flows and core functionality.
#### TC-F-001: [Test Case Title]
- **Requirement**: [Link to specific requirement]
- **Priority**: [High/Medium/Low]
- **Preconditions**:
- [Condition 1]
- [Condition 2]
- **Test Steps**:
1. [Step 1]
2. [Step 2]
3. [Step 3]
- **Expected Results**:
- [Expected result 1]
- [Expected result 2]
- **Postconditions**: [State after test]
### 2. Edge Case Tests
Test cases covering boundary conditions and unusual inputs.
#### TC-E-001: [Test Case Title]
[Same structure as above]
### 3. Error Handling Tests
Test cases covering error scenarios and failure modes.
#### TC-ERR-001: [Test Case Title]
[Same structure as above]
### 4. State Transition Tests
Test cases covering state changes and workflows (if applicable).
#### TC-ST-001: [Test Case Title]
[Same structure as above]
## Test Coverage Matrix
| Requirement ID | Test Cases | Coverage Status |
|---------------|------------|-----------------|
| REQ-001 | TC-F-001, TC-E-001 | ✓ Complete |
| REQ-002 | TC-F-002 | ⚠ Partial |
## Notes
- [Any additional testing considerations]
- [Known limitations or assumptions]
For each identified scenario, create a detailed test case following the structure above. Ensure:
Before finalizing, verify:
If coverage gaps exist, generate additional test cases.
Write the test cases to tests/<name>-test-cases.md where <name> is derived from:
Use the Write tool to create the file with the structured test cases.
After generating test cases, provide a brief summary in Chinese:
Before finalizing test cases, verify:
User: "Generate test cases for the user authentication feature in docs/auth-prd.md"
Process:
For detailed testing methodologies and best practices, see:
references/testing-principles.md - Core testing principles and patterns