codexqa-testcase-generator · V56 · case report v1.1.1

测试用例生成报告 5 条 cases

inventory-hold · 聚合 Web / 服务端 / APP 三类用例集

Run ID: inventory-hold 运行目录: /tmp/inventory-hold 正式方案: 未找到 test_design.md 生成时间: 2026-09-21 14:23:28 数据源: testcase/cases/

按端分布

2WEB
2SERVER
1APP

优先级分布

P0
3
P1
2
P2
0
P3
0

全部用例 5

三端用例聚合视图;点击卡片展开步骤与预期。空端在本运行中显示为空态。

WEB P0 [New][UI]

Hold then expire then buy

HOLD-W01
功能模块
Inventory hold
计划场景
S-01 expiry visible
生成时间
2026-09-21 10:00:00
来源文件
HOLD-W01.md

前置条件

Execution-environment description

  • environment ID: TBD
  • path: testdesign/test_design.md

Data-dependency description

  1. SKU with 3 units; create one hold of 1 unit so the storefront cache is warm

步骤与预期

#操作步骤预期结果
1

Create hold qty=1 for SKU A

Hold active; availability shows 2

2

Wait until hold window ends, then run expiry sweep

Reserved counter drops; cache must invalidate

3

Open storefront availability for SKU A

Availability is 3, not the held 2

溯源

  • PRD §6 expiry must be visible immediately

歧义说明

Hold window length stays TBD until product names minutes.

WEB P0 [New][Concurrency]

Concurrent last-unit hold

HOLD-W02
功能模块
Inventory hold
计划场景
S-02 no oversell
生成时间
2026-09-21 10:00:00
来源文件
HOLD-W02.md

前置条件

available=1; two clients ready

步骤与预期

#操作步骤预期结果
1

Two quantity=1 holds at the same instant

Exactly one 200 and one 409

2

Read stock

Never negative

溯源

  • PRD §4 no double holding
APP P1 [New][Interaction]

Commit then refund in app

HOLD-A01
功能模块
Reservation commit
计划场景
S-03 commit semantics
生成时间
2026-09-21 10:00:00
来源文件
HOLD-A01.md

前置条件

app session with an open hold

步骤与预期

#操作步骤预期结果
1

Tap commit

Status is COMMITTED; hold cannot be replayed

2

Request refund

Order row exists; NPE path does not fire

溯源

  • PRD §5 commit semantics
SERVER P0 [New][Function-Positive]

[Function-Positive] second partial refund

HOLD-S01
功能模块
Refund cap
计划场景
—
生成时间
—
来源文件
testcase_srv.md

前置条件

paidAmount=100, already refunded 40

步骤与预期

#操作步骤预期结果
1

POST /refunds amount=70

refundedTotal stays ≤ paidAmount; second call clamped or 409

溯源

PRD §11

SERVER P1 [New][Function-Positive]

[Function-Positive] volume tier at exactly 10

HOLD-S02
功能模块
Pricing
计划场景
—
生成时间
—
来源文件
testcase_srv.md

前置条件

catalog product, units=10

步骤与预期

#操作步骤预期结果
1

computeOrderTotal(10)

5% discount applied (inclusive bound)

溯源

PRD §8