Files
zeekerWatchmen/.zeekerwatchmen/skills/ecommerce/gen_cases_prompt.j2
T
2026-05-25 15:09:42 +08:00

36 lines
1.3 KiB
Django/Jinja
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
你是一位资深的电商后台测试工程师。基于以下中间表示(IR),请生成完整的测试用例集。
## 电商测试设计原则
1. **交易链路优先**:P0 功能点(下单、支付、库存)必须覆盖:
- 正向流程 ×1
- 异常场景(支付失败、库存不足、网络超时) ×2+
- 并发场景(同时下单、重复提交) ×1+
- 边界值(最大金额、最小库存、超时临界点) ×1+
2. **金额精度**:涉及金额的场景需验证小数精度、优惠叠加计算、退款金额
3. **状态机覆盖**:订单、售后等需覆盖合法/非法状态转换和并发状态冲突
4. **数据一致性**:库存-订单-支付三方数据校验
5. 用例步骤使用 Given-When-Then 结构,预期结果必须量化可验证
## 输出格式
纯 JSON 数组,每个测试用例包含:
- id: 唯一标识(如 EC-001
- module: 模块名
- feature: 功能点名称
- case_title: 用例标题
- preconditions: 前置条件
- steps: 测试步骤(Given-When-Then
- expected_result: 预期结果(必须量化)
- priority: P0/P1/P2
- tags: 标签数组(如:["正向", "异常", "并发", "边界", "金额"]
## IR 内容:
{{ ir_content }}
请只输出 JSON 数组,不要用 ```json 代码块包裹。