Overview
Use this skill to fix release testing as:主回归基线 + PRD 增量测试。
Maintain one shared master regression test suite across versions.
Each PRD version only adds test cases related to new or changed functionality.
Output artifacts to 自动化测试/<version>/。
Workflow
- Lock the scope from the PRD.
- Extract the version goals, test scope, out-of-scope, and acceptance criteria.
- If this is an incremental change, reject "a full rewrite of the test suite".
- Define test layers and boundaries.
- Map acceptance criteria to
Unit / Integration / E2E。 - Read
references/自动化测试封装指南.md's boundary section, markA/H/A+H。
- Initialize the version test directory.
- Read
references/自动化测试封装指南.md's initialization commands and templates. - Create
自动化测试/<version>/, and generateTEST_PLAN.md、TEST_REPORT.md。
- Implement incremental tests.
- Prioritize reusing existing master regression test cases.
- Only add PRD difference test cases to
tests/。 - Keep assertions deterministic and avoid fragile UI selectors.
- Execute the AI self-testing closed loop.
- Fixed order:
Unit -> Integration -> E2E。 - On failure, fix by root cause and rerun (up to 3 rounds).
- If blocked by the environment, clearly record the blockers and stop claiming a pass.
- Produce the test report.
- Fill in the command, pass rate, failure items, and remaining risks according to the template.
- Output the release gate conclusion:
PASSorFAIL。
Rules
- Do not rebuild the entire test suite from scratch for every PRD.
- You must maintain both the "master regression suite + version incremental suite".
- Each version must be bound to its own
TEST_PLANandTEST_REPORT。 - Reproducible commands and result summaries must be provided; vague conclusions are prohibited.
- Do not claim to cover all quality risks; you must list manual supplementary test items.
Automation boundary matrix
Suitable for automation (AI coverage recommended)
- Functional correctness (state transitions, API handling, validation rules)
- Regression paths (prevent regressions of historical defects)
- Deterministic boundary scenarios (null values, invalid values, duplicate operations)
- Stable smoke processes (startup, key navigation, save/submit)
- Quantifiable non-functional metrics (timeouts, error rates, crash rates)
Prioritize manual verification (manual fallback recommended)
- Usability and interaction smoothness
- Visual quality and brand consistency
- Rationality of business strategy
- Open-ended exploratory paths
- Product trade-offs and release priority judgment
Acceptance criteria labeling method
A: fully automatableH: manual verification onlyA+H: automated + manual joint verification
TEST_PLAN template
# TEST_PLAN(<version>)
## 1. 测试范围
- PRD:<path>
- 范围内:
- 非范围:
## 2. 完成门槛
1. 计划内用例:<x>/<x> 通过
2. P0 用例通过率:100%
3. 连续两轮稳定通过
4. 无阻断/严重缺陷遗留
## 3. 用例清单
### Unit
- UT-xx:
### Integration
- IT-xx:
### E2E
- E2E-xx:
## 4. 执行顺序
1. Unit
2. Integration
3. E2E
4. 自动修复循环(最多 3 轮)
## 5. 输出产物
- TEST_REPORT.md
- 命令执行结果摘要
TEST_REPORT template
# TEST_REPORT(<version>)
## 1. 结果摘要
- 日期:
- PRD:
- 结论:PASS | FAIL
## 2. 执行命令与结果
- <command>
- result:
## 3. 分层覆盖结果
- Unit:passed/total
- Integration:passed/total
- E2E:passed/total
## 4. 失败用例
- 用例 ID:
- 现象:
- 根因:
- 修复状态:
## 5. 剩余风险(人工补测)
- 风险点:
- 自动化无法完全覆盖原因:
## 6. 发布门禁
- 门禁检查状态:
- 最终决策:
Version directory initialization command
Execute in the project root directory:
version="V0.6"
base_dir="自动化测试/$version"
mkdir -p "$base_dir/tests/unit" "$base_dir/tests/integration" "$base_dir/tests/e2e"
cat > "$base_dir/TEST_PLAN.md" <<'TPL'
# TEST_PLAN(V0.6)
## 1. 测试范围
- PRD:
- 范围内:
- 非范围:
## 2. 完成门槛
1. 计划内用例全部通过
2. P0 用例通过率 100%
3. 连续两轮稳定通过
4. 无阻断/严重缺陷遗留
TPL
cat > "$base_dir/TEST_REPORT.md" <<'RPT'
# TEST_REPORT(V0.6)
## 1. 结果摘要
- 日期:
- 结论:
RPT