@guanlin4924/devflow-pi 0.1.86 → 0.1.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/package.json +1 -1
- package/plugins/devflow-core/extensions/devflow-core.ts +199 -9
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/acceptance_test_runner.py +15 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/advance_state.rb +49 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/checker_adapter.rb +83 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/checker_registry.rb +19 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/checkpoint_meta.rb +46 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/execution_contract.rb +10 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/gate_runtime.rb +32 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_state.rb +44 -41
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_workflow.rb +5 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/inspect_state.rb +15 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/machine_evidence.rb +15 -9
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/review_preflight.py +238 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/review_run.py +234 -32
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/validate_state.rb +63 -11
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/workflow_gate_contract.rb +5 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/templates/feature-development.yaml +40 -31
- package/plugins/devflow-core/skills/workflow-pipeline/SKILL.md +11 -5
- package/plugins/devflow-core/skills/workflow-pipeline/references/pipeline-flow.md +6 -6
- package/plugins/devflow-implementation/skills/workflow-change-plan/SKILL.md +16 -1
- package/plugins/devflow-implementation/skills/workflow-change-plan/references/output-template.md +3 -1
- package/plugins/devflow-quality/agents/code-reviewer.md +7 -1
- package/plugins/devflow-quality/skills/code-review/SKILL.md +10 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/SKILL.md +37 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/SKILL.md +327 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/assets/output-template.md +213 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/bug-rules.md +9 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/coverage-checklist.md +63 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/exception-checklist.md +37 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/test-type-slots/api-test.md +58 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/test-type-slots/boundary-test.md +151 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/test-type-slots/common-test.md +49 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/test-type-slots/compatibility-test.md +105 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/test-type-slots/data-test.md +67 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/test-type-slots/exception-test.md +109 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/test-type-slots/function-test.md +65 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/test-type-slots/integration-test.md +36 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/test-type-slots/performance-test.md +100 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/test-type-slots/scenario-test.md +63 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/test-type-slots/security-test.md +55 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/test-type-slots/ui-test.md +49 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/test-type-slots/usability-test.md +46 -0
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/references/writing-guide.md +111 -0
- package/src/constants.ts +1 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# API Test Slot
|
|
2
|
+
|
|
3
|
+
## Applies When
|
|
4
|
+
|
|
5
|
+
Expanding nodes from:
|
|
6
|
+
- API/服务 section in feature-breakdown
|
|
7
|
+
- Any leaf describing API calls, service triggers, callbacks, idempotency, retry
|
|
8
|
+
|
|
9
|
+
## Required Fields
|
|
10
|
+
|
|
11
|
+
- **前置条件**: API path, request parameters, authentication method, mock data setup
|
|
12
|
+
- **测试步骤**: construct request → send → verify response
|
|
13
|
+
- **预期结果**: HTTP status code, response body structure, error code, side effects
|
|
14
|
+
|
|
15
|
+
## Common Patterns
|
|
16
|
+
|
|
17
|
+
API trigger:
|
|
18
|
+
```
|
|
19
|
+
- 功能: 每月1日独立任务自动触发
|
|
20
|
+
```
|
|
21
|
+
→ Test case: "每月1日回刷任务自动触发测试"
|
|
22
|
+
- Verify task starts at expected time
|
|
23
|
+
|
|
24
|
+
API calculation:
|
|
25
|
+
```
|
|
26
|
+
- 逻辑: 回刷后佣金金额 = 原佣金 × (最终分成比例 / 80%)
|
|
27
|
+
原佣金 100, 新比例 90% → 预期 112.5
|
|
28
|
+
```
|
|
29
|
+
→ Test case: "佣金回刷计算准确性测试"
|
|
30
|
+
|
|
31
|
+
Idempotency:
|
|
32
|
+
```
|
|
33
|
+
- 功能: 重复执行回刷任务 → 幂等, 不重复累加佣金
|
|
34
|
+
```
|
|
35
|
+
→ Test case: "回刷任务重复执行幂等测试"
|
|
36
|
+
- Execute same batch twice, verify commission unchanged
|
|
37
|
+
|
|
38
|
+
Retry:
|
|
39
|
+
```
|
|
40
|
+
- 功能: 部分客户回刷失败 → 自动重试, 记录失败原因
|
|
41
|
+
```
|
|
42
|
+
→ Test case: "回刷失败自动重试测试"
|
|
43
|
+
|
|
44
|
+
Callback:
|
|
45
|
+
```
|
|
46
|
+
- 功能: 回调失败 → 重试机制
|
|
47
|
+
```
|
|
48
|
+
→ Test case: "回调失败重试测试"
|
|
49
|
+
|
|
50
|
+
## Quality Checklist
|
|
51
|
+
|
|
52
|
+
- [ ] Normal request/response verified
|
|
53
|
+
- [ ] Parameter validation covered: required, type, range, boundary
|
|
54
|
+
- [ ] Idempotency: repeated request produces no side effects
|
|
55
|
+
- [ ] Retry mechanism verified (if applicable)
|
|
56
|
+
- [ ] Callback handling verified (if applicable)
|
|
57
|
+
- [ ] Error codes and error messages are specific
|
|
58
|
+
- [ ] Authentication/authorization validated at API level
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Boundary Test Slot
|
|
2
|
+
|
|
3
|
+
## Applies When
|
|
4
|
+
|
|
5
|
+
Expanding nodes that involve:
|
|
6
|
+
- Numeric constraints: min, max, threshold, step, range (e.g. 分成比例 0-100, 档位数 1-5, 金额上限)
|
|
7
|
+
- Time constraints: effective/expiry switch, grace period end, monthly cutoff, daily deadline
|
|
8
|
+
- State boundary: condition just met / just not met for state transition
|
|
9
|
+
- Capacity constraints: max items, max rows, max file size, max concurrent
|
|
10
|
+
- Order/rank boundary: first position, last position, just promoted, just demoted
|
|
11
|
+
|
|
12
|
+
Always load before writing boundary test cases. Boundary tests belong in **02-场景类/异常场景** or as a separate **边界场景** subsection.
|
|
13
|
+
|
|
14
|
+
## Generation Rules
|
|
15
|
+
|
|
16
|
+
### Rule 1: Numeric Boundary — 界内/界上/界外
|
|
17
|
+
|
|
18
|
+
For every numeric constraint in the feature-breakdown, generate three test cases:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
约束: 分成比例 0-100, 正整数
|
|
22
|
+
→ 界内: 80 (合法值) — "分成比例80正常提交测试"
|
|
23
|
+
→ 界上: 100 (最大值) — "分成比例100允许提交测试"
|
|
24
|
+
→ 界上: 1 (最小值) — "分成比例1允许提交测试"
|
|
25
|
+
→ 界外: 0 — "分成比例0阻断提交测试"
|
|
26
|
+
→ 界外: 101 — "分成比例101阻断提交测试"
|
|
27
|
+
→ 界外: -1 — "分成比例负数阻断提交测试"
|
|
28
|
+
→ 界外: 1.5 — "分成比例小数阻断提交测试"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
约束: 档位数 1-5, 第5档后新增置灰
|
|
33
|
+
→ 界内: 3档 — "3个档位正常展示测试"
|
|
34
|
+
→ 界上: 5档 — "5个档位新增按钮置灰测试"
|
|
35
|
+
→ 界外: 尝试新增第6档 — "第6档新增按钮不可点击测试"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
约束: 阶梯补贴 < 20 的正整数
|
|
40
|
+
→ 界内: 5 — "阶梯补贴5正常提交测试"
|
|
41
|
+
→ 界上: 19 — "阶梯补贴19正常提交测试"
|
|
42
|
+
→ 界外: 20 — "阶梯补贴20阻断提交测试"
|
|
43
|
+
→ 界外: 0 — "阶梯补贴0阻断提交测试"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
约束: 金额不超过云仓 CPA 上限 (5元)
|
|
48
|
+
→ 界内: 3.00 — "金额3元正常提交测试"
|
|
49
|
+
→ 界上: 5.00 — "金额等于上限允许提交测试"
|
|
50
|
+
→ 界外: 5.01 — "金额超过上限0.01阻断提交测试"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Rule 2: Time Boundary — 生效前/临界点/生效后
|
|
54
|
+
|
|
55
|
+
For every time constraint in the feature-breakdown, generate:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
约束: 配置修改下个自然月生效 (当月15日修改)
|
|
59
|
+
→ 生效前: 当月16日计算 — "当月仍按旧配置计算测试"
|
|
60
|
+
→ 临界点: 当月最后一天 — "当月最后一天仍按旧配置测试"
|
|
61
|
+
→ 生效后: 次月1日0:00 — "次月1日起按新配置计算测试"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
约束: 白名单删除次月生效 (5月20日删除)
|
|
66
|
+
→ 删除前: 5月21日回刷 — "当月仍按白名单计算测试"
|
|
67
|
+
→ 临界点: 5月31日 — "月末最后一天仍按白名单测试"
|
|
68
|
+
→ 失效后: 6月1日 — "次月起参与统一爬坡测试"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
约束: 回刷1日8:00前完成
|
|
73
|
+
→ 正常: 1日7:30完成 — "8:00前完成回刷任务测试"
|
|
74
|
+
→ 边界: 1日7:59完成 — "临界时间完成测试"
|
|
75
|
+
→ 超时: 1日8:01未完成 — "回刷超时告警测试"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
约束: 保档3个自然月 (1月达成第三档, 保档1-3月)
|
|
80
|
+
→ 保档中: 2月考核 — "保档第二月仍按保档阶梯测试"
|
|
81
|
+
→ 临界点: 3月重新考核 — "保档第三月重新考核测试"
|
|
82
|
+
→ 达标续期: 3月达标 — "保档续期3个月测试"
|
|
83
|
+
→ 未达标降档: 3月未达标 — "4月降档到实际订单所属档位测试"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
约束: 指定生效日期早于审批日 (指定5-1, 审批5-10)
|
|
88
|
+
→ 审批通过后 — "按指定日期5-1生效测试"
|
|
89
|
+
→ 回刷: 5月1-10日订单 — "允许补算/回刷测试"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Rule 3: State Boundary — 切换前/切换条件/切换后
|
|
93
|
+
|
|
94
|
+
For every state transition in the feature-breakdown, generate:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
状态: 待审核 → 生效中 / 已拒绝
|
|
98
|
+
→ 切换前: 待审核状态 — "待审核名单操作按钮展示测试"
|
|
99
|
+
→ 切换-通过: 审核通过 — "名单状态变为生效中测试"
|
|
100
|
+
→ 切换-拒绝: 审核拒绝 — "名单状态变为已拒绝测试"
|
|
101
|
+
→ 切换后-生效中: — "生效中名单可修改可删除测试"
|
|
102
|
+
→ 切换后-已拒绝: — "已拒绝名单只读测试"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
状态: 升级触发 (保档期内达成更高档)
|
|
107
|
+
→ 切换前: 第二档保档中 — "保档第二档状态展示测试"
|
|
108
|
+
→ 触发条件: 上月订单达第四档 — "达成更高档触发升档测试"
|
|
109
|
+
→ 切换后: 立即升为第四档 — "保档期重置3个月测试"
|
|
110
|
+
→ 回刷: 达成月份按新档回刷 — "达成月份订单回刷测试"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Rule 4: Capacity Boundary — 空/满/超
|
|
114
|
+
|
|
115
|
+
For every capacity constraint in the feature-breakdown, generate:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
约束: 消息列表最近5条
|
|
119
|
+
→ 空: 0条消息 — "无消息时展示空态测试"
|
|
120
|
+
→ 不满: 3条消息 — "少于5条正常展示测试"
|
|
121
|
+
→ 临界: 5条消息 — "刚好5条正常展示测试"
|
|
122
|
+
→ 超: 6条消息 — "仅展示最近5条测试"
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
约束: 第5档后新增按钮置灰
|
|
127
|
+
→ 不满: 3档 — "新增按钮可点击测试"
|
|
128
|
+
→ 临界: 5档 — "新增按钮置灰不可点击测试"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
约束: 大数据量导出
|
|
133
|
+
→ 正常: 1000条 — "千级数据导出正常测试"
|
|
134
|
+
→ 边界: 阈值条数 — "达到同步导出上限测试"
|
|
135
|
+
→ 超: 超过阈值 — "触发异步导出测试"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Required Fields
|
|
139
|
+
|
|
140
|
+
- **前置条件**: the exact constraint value being tested (not "some value" — the exact boundary number)
|
|
141
|
+
- **测试步骤**: set up the boundary condition → trigger the behavior → verify
|
|
142
|
+
- **预期结果**: precise expected behavior at the boundary (允许/阻断/切换/不变)
|
|
143
|
+
|
|
144
|
+
## Quality Checklist
|
|
145
|
+
|
|
146
|
+
- [ ] For every numeric constraint field, 界内/界上/界外 cases generated
|
|
147
|
+
- [ ] For every time constraint, 生效前/临界点/生效后 cases generated
|
|
148
|
+
- [ ] For every state transition, 切换前/切换条件/切换后 cases generated
|
|
149
|
+
- [ ] For every capacity constraint, 空/满/超 cases generated
|
|
150
|
+
- [ ] Boundary values are exact numbers (not ranges like "a large number")
|
|
151
|
+
- [ ] Expected results are specific to each boundary case
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Common Test Type Slot
|
|
2
|
+
|
|
3
|
+
This slot applies to all checkpoint generation, regardless of type. Always load this slot before type-specific slots.
|
|
4
|
+
|
|
5
|
+
## Applies When
|
|
6
|
+
|
|
7
|
+
All checkpoint generation. Always loaded first.
|
|
8
|
+
|
|
9
|
+
## Generic Constraints(叶子检查点通用约束)
|
|
10
|
+
|
|
11
|
+
- 叶子是**一句话检查点**,不带任何字段块(无 优先级/关联/前置/步骤/预期)
|
|
12
|
+
- 一个叶子只测一个目的
|
|
13
|
+
- 叶子以动词起头,描述可观察、可验证的行为或结果
|
|
14
|
+
- 叶子内容无模糊词("大概"/"可能"/"或"/"应该")
|
|
15
|
+
- **边界值不合并**(每个边界独立成叶)
|
|
16
|
+
- **FP 编号不进任何节点标题**(标题纯语义名,也不带章节号);FP 仅在文末「覆盖核对」表做追溯(见 writing-guide「FP 编号挂法」)
|
|
17
|
+
|
|
18
|
+
## Priority Rules(用于决定展开深度,优先级不写进叶子)
|
|
19
|
+
|
|
20
|
+
- P0 功能点:必须完整展开(正常+边界+异常+权限),不允许跳过
|
|
21
|
+
- P1 功能点:完整展开,缺口需在"待确认测试项(PT-xxx)"注明
|
|
22
|
+
- P2 功能点:主路径覆盖,边界可延迟(注明)
|
|
23
|
+
|
|
24
|
+
## Output Format
|
|
25
|
+
|
|
26
|
+
每个叶子只写一句话:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
- 输入0或负数时提交阻断并提示
|
|
30
|
+
- 未上传主图时保存阻断并提示必填
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**不写**这种用例字段块形态(已废弃):
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
- xxx测试
|
|
37
|
+
- 优先级:P1 ❌ 叶子不带字段块
|
|
38
|
+
- 关联:FP-xxx ❌
|
|
39
|
+
- 测试步骤:... ❌
|
|
40
|
+
- 预期结果:... ❌
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Verification Gates
|
|
44
|
+
|
|
45
|
+
- [ ] 所有叶子是一句话,无字段块
|
|
46
|
+
- [ ] 叶子无模糊词("大概"/"可能"/"或"/"应该")
|
|
47
|
+
- [ ] 边界值是独立叶子,未合并
|
|
48
|
+
- [ ] 标题纯语义名,无 FP 编号、无章节号残留(FP 只在覆盖核对表)
|
|
49
|
+
- [ ] 无残留的用例字段块形态(优先级/关联/测试步骤/预期结果)
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Compatibility Test Slot
|
|
2
|
+
|
|
3
|
+
## Applies When
|
|
4
|
+
|
|
5
|
+
Expanding nodes that involve:
|
|
6
|
+
- Old/new version coexistence (old rules + new rules running in parallel)
|
|
7
|
+
- Data migration / initialization from legacy system
|
|
8
|
+
- Old data read-only after new system launch
|
|
9
|
+
- Cross-version data format compatibility
|
|
10
|
+
- No transition period (硬切换, 无过渡期)
|
|
11
|
+
|
|
12
|
+
Compatibility test cases belong in **03-专项类/兼容测试**.
|
|
13
|
+
|
|
14
|
+
## Generation Rules
|
|
15
|
+
|
|
16
|
+
### Rule 1: For every "下线" / "迁移" / "初始化" node — generate old-to-new transition cases
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
Pattern: 旧规则下线, 新规则上线
|
|
20
|
+
→ Test case: "旧入口隐藏测试"
|
|
21
|
+
前置条件: 新系统已上线
|
|
22
|
+
步骤: 1.查看菜单 2.尝试访问旧URL
|
|
23
|
+
预期: 旧菜单不展示; 旧URL被拦截或重定向
|
|
24
|
+
|
|
25
|
+
→ Test case: "旧数据保留只读测试"
|
|
26
|
+
前置条件: 旧数据存在
|
|
27
|
+
步骤: 1.查询旧数据 2.尝试编辑/删除
|
|
28
|
+
预期: 可查询; 不可新建/编辑/删除
|
|
29
|
+
|
|
30
|
+
→ Test case: "旧规则不再参与计算测试"
|
|
31
|
+
前置条件: 客户同时有旧规则和新阶梯结果
|
|
32
|
+
步骤: 1.触发佣金计算 2.查看使用的规则
|
|
33
|
+
预期: 仅使用新规则; 旧规则不参与计算
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Rule 2: For every "初始化" node — generate data migration cases
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
Pattern: 历史数据初始化进入新系统
|
|
40
|
+
→ Test case: "初始化数据导入测试"
|
|
41
|
+
前置条件: 准备初始化名单文件
|
|
42
|
+
步骤: 1.执行导入 2.查看导入结果
|
|
43
|
+
预期: 数据正确导入; 状态默认生效通过; 来源标识为"初始化"
|
|
44
|
+
|
|
45
|
+
→ Test case: "初始化数据与后续新增数据区分测试"
|
|
46
|
+
前置条件: 初始化数据和后续新增数据共存
|
|
47
|
+
步骤: 1.查看列表 2.对比来源字段
|
|
48
|
+
预期: 初始化数据来源可追踪; 与后续新增数据区分
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Rule 3: For every "生效时间" / "切换时间" node — generate cutover cases
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Pattern: 新规则 2026-06 生效, 无过渡期
|
|
55
|
+
→ Test case: "2026-05仍按旧规则结算测试"
|
|
56
|
+
前置条件: 时间 = 2026年5月
|
|
57
|
+
步骤: 1.触发5月结算
|
|
58
|
+
预期: 按旧规则结算
|
|
59
|
+
|
|
60
|
+
→ Test case: "2026-06起按新规则结算测试"
|
|
61
|
+
前置条件: 时间 = 2026年6月
|
|
62
|
+
步骤: 1.触发6月结算
|
|
63
|
+
预期: 按新规则(白名单+新阶梯)结算; 不使用旧规则
|
|
64
|
+
|
|
65
|
+
→ Test case: "无过渡期直接切换测试"
|
|
66
|
+
前置条件: 对比5月和6月结算规则
|
|
67
|
+
步骤: 1.查看5月和6月结算使用的规则
|
|
68
|
+
预期: 5月使用旧规则; 6月使用新规则; 中间无过渡策略
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Rule 4: For every "权限码" / "权限体系" node — generate old permission compatibility cases
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Pattern: 老权限码绑定不应暴露旧入口
|
|
75
|
+
→ Test case: "老权限码绑定不暴露旧入口测试"
|
|
76
|
+
前置条件: 账号有旧"联盟客户(旧)"权限码
|
|
77
|
+
步骤: 1.登录后台 2.查看菜单
|
|
78
|
+
预期: 不展示"联盟客户(旧)"和"分成规则"入口
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Rule 5: For every "文案调整" / "字段变更" node — generate display change cases
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
Pattern: "饿了么专场" → "淘宝闪购数据"
|
|
85
|
+
→ Test case: "淘宝闪购数据文案替换测试"
|
|
86
|
+
前置条件: 进入详情页
|
|
87
|
+
步骤: 1.查看原"饿了么专场"相关内容
|
|
88
|
+
预期: 文案已调整为"淘宝闪购数据"; 数据查询能力不变
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Required Fields
|
|
92
|
+
|
|
93
|
+
- **前置条件**: old version state, new version state, cutover time
|
|
94
|
+
- **测试步骤**: operate before cutover → operate at cutover → operate after cutover
|
|
95
|
+
- **预期结果**: behavior difference between old and new system
|
|
96
|
+
|
|
97
|
+
## Quality Checklist
|
|
98
|
+
|
|
99
|
+
- [ ] Old entry points hidden (menus, buttons, URLs)
|
|
100
|
+
- [ ] Old data accessible as read-only but not editable
|
|
101
|
+
- [ ] Old rules not participating in new calculations
|
|
102
|
+
- [ ] Cutover date is precise (which month/day the switch happens)
|
|
103
|
+
- [ ] Initialization data is traceable and distinguishable from new data
|
|
104
|
+
- [ ] No transition period means immediate switch (not gradual rollover)
|
|
105
|
+
- [ ] Old permission codes don't leak old entry points
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Data Test Slot
|
|
2
|
+
|
|
3
|
+
## Applies When
|
|
4
|
+
|
|
5
|
+
Expanding nodes from feature-breakdown:
|
|
6
|
+
- `- 逻辑` entries
|
|
7
|
+
- `- 逻辑验证` entries
|
|
8
|
+
- Any leaf describing: calculation formulas, statistics, status transitions, rule priority, data source, data consistency
|
|
9
|
+
|
|
10
|
+
## Required Fields
|
|
11
|
+
|
|
12
|
+
- **前置条件**: specific input data values (not "some data" — exact numbers)
|
|
13
|
+
- **测试步骤**: input values → trigger calculation → compare result
|
|
14
|
+
- **预期结果**: precise to decimal places, units, format
|
|
15
|
+
|
|
16
|
+
## Common Patterns
|
|
17
|
+
|
|
18
|
+
Calculation formula:
|
|
19
|
+
```
|
|
20
|
+
- 逻辑: 实际到账分成比 = 80% + 阶梯补贴
|
|
21
|
+
阶梯补贴 = 10% → 预期实际到账比例 = 90%
|
|
22
|
+
```
|
|
23
|
+
→ Test case: "实际到账分成比计算准确性测试"
|
|
24
|
+
- Input: 阶梯补贴 = 10
|
|
25
|
+
- Expected: 实际到账比例 = 90%
|
|
26
|
+
|
|
27
|
+
Statistics:
|
|
28
|
+
```
|
|
29
|
+
- 逻辑: 日均订单数 = 总订单笔数 / 筛选自然日, 精确到个位数, 非四舍五入
|
|
30
|
+
总订单 = 100, 自然日 = 30 → 预期 3 (not 3.33)
|
|
31
|
+
```
|
|
32
|
+
→ Test case: "日均订单数精确到个位数非四舍五入测试"
|
|
33
|
+
|
|
34
|
+
Rule priority:
|
|
35
|
+
```
|
|
36
|
+
- 逻辑: 白名单优先级 > 新阶梯 > 旧规则
|
|
37
|
+
客户同时有白名单(95%)和新阶梯(85%) → 使用 95%
|
|
38
|
+
```
|
|
39
|
+
→ Test case: "白名单优先级高于新阶梯测试"
|
|
40
|
+
|
|
41
|
+
Data source:
|
|
42
|
+
```
|
|
43
|
+
- 逻辑: 数据来源为当前登录联盟客户信息
|
|
44
|
+
```
|
|
45
|
+
→ Test case: "客户名称数据来源准确性测试"
|
|
46
|
+
- Compare with account settings
|
|
47
|
+
|
|
48
|
+
Data consistency:
|
|
49
|
+
```
|
|
50
|
+
- 逻辑: 消息已读状态与消息列表页一致
|
|
51
|
+
```
|
|
52
|
+
→ Test case: "消息已读状态跨页面一致性测试"
|
|
53
|
+
|
|
54
|
+
Status transition:
|
|
55
|
+
```
|
|
56
|
+
- 逻辑: 审批状态流转: 待审核 → 生效中 / 已拒绝
|
|
57
|
+
```
|
|
58
|
+
→ Test case: "审批状态流转准确性测试"
|
|
59
|
+
|
|
60
|
+
## Quality Checklist
|
|
61
|
+
|
|
62
|
+
- [ ] Calculation formula: input / output / precision verified
|
|
63
|
+
- [ ] Data source matches baseline (BR-xxx or FP-xxx)
|
|
64
|
+
- [ ] Rule priority covered (e.g., whitelist > new tier > old rules)
|
|
65
|
+
- [ ] Data consistency across pages verified (same field, same value)
|
|
66
|
+
- [ ] Status transitions mapped and verified
|
|
67
|
+
- [ ] Units and format explicitly stated (元, %, 万, yyyy-MM-dd)
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Exception Test Slot
|
|
2
|
+
|
|
3
|
+
## Applies When
|
|
4
|
+
|
|
5
|
+
Expanding nodes that involve exception handling:
|
|
6
|
+
- API timeout, network failure, server error
|
|
7
|
+
- Data validation failure (required field empty, format mismatch, duplicate)
|
|
8
|
+
- Business rule violation (insufficient balance, permission denied, status conflict)
|
|
9
|
+
- Concurrency conflicts (two users operating same resource)
|
|
10
|
+
- Partial failure (batch job with some items failing)
|
|
11
|
+
- Bypass scenarios (direct URL access, skipping required steps)
|
|
12
|
+
|
|
13
|
+
Exception test cases belong in **02-场景类/异常场景**.
|
|
14
|
+
|
|
15
|
+
Use `references/exception-checklist.md` to identify what exceptions exist, then use this slot to generate the test cases.
|
|
16
|
+
|
|
17
|
+
## Generation Rules
|
|
18
|
+
|
|
19
|
+
### Rule 1: For every "接口" or "API" node — generate API failure cases
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Pattern: 接口超时/失败 → 用户看到什么, 操作是否保留
|
|
23
|
+
→ Test case: "接口超时时展示错误提示测试"
|
|
24
|
+
- 前置条件: Mock 接口返回 timeout
|
|
25
|
+
- 测试步骤: 1.触发操作 2.等待超时
|
|
26
|
+
- 预期结果: 展示错误提示; 当前页面不崩溃; 用户可重试
|
|
27
|
+
|
|
28
|
+
→ Test case: "接口返回500时展示错误提示测试"
|
|
29
|
+
- 前置条件: Mock 接口返回 500
|
|
30
|
+
- 测试步骤: 1.触发操作
|
|
31
|
+
- 预期结果: 展示错误提示; 弹窗不关闭 (如为弹窗内操作)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Rule 2: For every "校验" node — generate validation failure cases
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
Pattern: 必填校验 / 格式校验 / 唯一性校验
|
|
38
|
+
→ Test case: "XX字段为空时提交阻断测试"
|
|
39
|
+
前置条件: 打开表单, XX字段为空
|
|
40
|
+
步骤: 1.点击提交 2.验证阻断
|
|
41
|
+
预期: 阻断提交; 提示"请输入XX"
|
|
42
|
+
|
|
43
|
+
→ Test case: "XX字段格式错误时提交阻断测试"
|
|
44
|
+
前置条件: XX字段输入非法格式
|
|
45
|
+
步骤: 1.点击提交
|
|
46
|
+
预期: 阻断提交; 提示具体格式要求
|
|
47
|
+
|
|
48
|
+
→ Test case: "XX重复时提交阻断测试"
|
|
49
|
+
前置条件: 已有相同XX的记录
|
|
50
|
+
步骤: 1.输入重复值 2.提交
|
|
51
|
+
预期: 阻断提交; 提示"XX已存在"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Rule 3: For every "权限" node — generate bypass cases
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Pattern: 按钮不显示 + 接口层校验
|
|
58
|
+
→ Test case: "绕过前端直接调用接口返回无权限测试"
|
|
59
|
+
前置条件: 无权限账号已登录
|
|
60
|
+
步骤: 1.获取接口路径和参数 2.绕过前端直接发送请求
|
|
61
|
+
预期: 接口返回无权限错误 (非200)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Rule 4: For every concurrent operation — generate race condition cases
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
Pattern: 同一资源被两人同时操作
|
|
68
|
+
→ Test case: "并发操作冲突测试"
|
|
69
|
+
前置条件: 两个账号同时打开同一资源
|
|
70
|
+
步骤: 1.用户A点击删除 2.用户B同时点击删除
|
|
71
|
+
预期: 仅一人成功; 另一人收到"资源已被操作"提示
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Rule 5: For every batch/task/job — generate partial failure cases
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
Pattern: 批量任务部分失败
|
|
78
|
+
→ Test case: "回刷任务部分失败自动重试测试"
|
|
79
|
+
前置条件: Mock 部分客户回刷失败
|
|
80
|
+
步骤: 1.触发回刷任务 2.观察失败处理
|
|
81
|
+
预期: 成功客户正常更新; 失败客户自动重试; 失败原因记录到日志
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Rule 6: For every 幂等 requirement — generate idempotency cases
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Pattern: 重复执行不产生副作用
|
|
88
|
+
→ Test case: "回刷任务重复执行幂等测试"
|
|
89
|
+
前置条件: 同一批次回刷已完成
|
|
90
|
+
步骤: 1.再次执行同一批次回刷 2.对比结果
|
|
91
|
+
预期: 佣金金额不变; 不重复累加
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Required Fields
|
|
95
|
+
|
|
96
|
+
- **前置条件**: mock condition (timeout / error code / empty data / concurrency setup)
|
|
97
|
+
- **测试步骤**: trigger exception → observe error handling → verify recovery
|
|
98
|
+
- **预期结果**: error message displayed; user action preserved or rollback; page not crashed; retry available (if applicable)
|
|
99
|
+
|
|
100
|
+
## Quality Checklist
|
|
101
|
+
|
|
102
|
+
- [ ] Every API-dependent operation has: timeout case + server error case
|
|
103
|
+
- [ ] Every validation rule has: empty + invalid format + boundary violation cases
|
|
104
|
+
- [ ] Every permission control has: frontend hide + API bypass rejection
|
|
105
|
+
- [ ] Every concurrent scenario has: two-user race condition
|
|
106
|
+
- [ ] Every batch job has: partial failure + retry cases
|
|
107
|
+
- [ ] Every idempotency requirement has: repeated execution case
|
|
108
|
+
- [ ] Error messages are concrete (not "操作失败" but specific like "该客户在白名单内且已生效")
|
|
109
|
+
- [ ] Error state is recoverable (user can retry or go back)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Function Test Slot
|
|
2
|
+
|
|
3
|
+
## Applies When
|
|
4
|
+
|
|
5
|
+
Expanding nodes from feature-breakdown:
|
|
6
|
+
- `- 功能` entries
|
|
7
|
+
- `- 功能验证` entries
|
|
8
|
+
- Any leaf describing user interaction, system response, validation, navigation, button behavior
|
|
9
|
+
|
|
10
|
+
## Required Fields
|
|
11
|
+
|
|
12
|
+
- **前置条件**: role permissions, data state, current page
|
|
13
|
+
- **测试步骤**: action → observe response → verify result
|
|
14
|
+
- **预期结果**: state change after action, navigation target, data update, error message shown
|
|
15
|
+
|
|
16
|
+
## Common Patterns
|
|
17
|
+
|
|
18
|
+
Button click → dialog:
|
|
19
|
+
```
|
|
20
|
+
- 功能: 点击后弹出"新增"弹窗
|
|
21
|
+
```
|
|
22
|
+
→ Test case: "点击按钮弹出新增弹窗测试"
|
|
23
|
+
- Normal scenario: click → dialog opens
|
|
24
|
+
- Exception scenario: rapid double-click → only one dialog
|
|
25
|
+
|
|
26
|
+
Validation — required field:
|
|
27
|
+
```
|
|
28
|
+
- 功能: 必填校验:为空时阻断并提示"请输入XXX"
|
|
29
|
+
```
|
|
30
|
+
→ Test case: "XXX字段为空时提交阻断测试"
|
|
31
|
+
- Also cover: whitespace-only, extreme length, special characters
|
|
32
|
+
|
|
33
|
+
Validation — uniqueness:
|
|
34
|
+
```
|
|
35
|
+
- 功能: 唯一性校验:重复时提示"XXX已存在"
|
|
36
|
+
```
|
|
37
|
+
→ Test case: "XXX重复创建阻断测试"
|
|
38
|
+
|
|
39
|
+
Permission control:
|
|
40
|
+
```
|
|
41
|
+
- 功能: 无操作权限时按钮不显示
|
|
42
|
+
```
|
|
43
|
+
→ Test case: "无权限时操作按钮不显示测试"
|
|
44
|
+
- Must verify: button is NOT displayed (not disabled, not greyed out)
|
|
45
|
+
|
|
46
|
+
Duplicate submit prevention:
|
|
47
|
+
```
|
|
48
|
+
- 功能: 接口请求中按钮置灰,防止重复提交
|
|
49
|
+
```
|
|
50
|
+
→ Test case: "提交中按钮置灰防重复提交测试"
|
|
51
|
+
|
|
52
|
+
API error:
|
|
53
|
+
```
|
|
54
|
+
- 功能: 接口异常时提示错误信息
|
|
55
|
+
```
|
|
56
|
+
→ Test case: "接口异常时展示错误提示测试"
|
|
57
|
+
|
|
58
|
+
## Quality Checklist
|
|
59
|
+
|
|
60
|
+
- [ ] Validation rules (required / format / length / uniqueness) are covered
|
|
61
|
+
- [ ] Permission control: unauthorized buttons are "not displayed" (not disabled)
|
|
62
|
+
- [ ] Duplicate submit prevention: button disabled during request
|
|
63
|
+
- [ ] API error: error message shown, dialog stays open (if applicable)
|
|
64
|
+
- [ ] Navigation/jump target is correct
|
|
65
|
+
- [ ] Data refresh after successful operation is covered
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Integration Test Slot
|
|
2
|
+
|
|
3
|
+
## Applies When
|
|
4
|
+
|
|
5
|
+
Expanding nodes involving:
|
|
6
|
+
- Cross-module data flow
|
|
7
|
+
- Cross-system data synchronization
|
|
8
|
+
- Module-to-module data linkage
|
|
9
|
+
- State change propagation across modules
|
|
10
|
+
|
|
11
|
+
## Required Fields
|
|
12
|
+
|
|
13
|
+
- **前置条件**: all involved modules/systems in known state
|
|
14
|
+
- **测试步骤**: trigger change in module A → observe impact in module B
|
|
15
|
+
- **预期结果**: data consistency, state synchronization, no orphan data
|
|
16
|
+
|
|
17
|
+
## Common Patterns
|
|
18
|
+
|
|
19
|
+
Cross-module data linkage:
|
|
20
|
+
```
|
|
21
|
+
模块A的数据变更 → 模块B展示更新后的数据
|
|
22
|
+
```
|
|
23
|
+
→ Test case: "模块间数据联动测试"
|
|
24
|
+
|
|
25
|
+
Cross-system sync:
|
|
26
|
+
```
|
|
27
|
+
系统A的回刷结果 → 系统B的账单更新
|
|
28
|
+
```
|
|
29
|
+
→ Test case: "跨系统数据同步测试"
|
|
30
|
+
|
|
31
|
+
## Quality Checklist
|
|
32
|
+
|
|
33
|
+
- [ ] Data flows correctly between modules
|
|
34
|
+
- [ ] State changes propagate correctly to related modules
|
|
35
|
+
- [ ] No orphan data after cross-module operations
|
|
36
|
+
- [ ] Data format consistent across system boundaries
|