thread-master/docs/product/demand-radar/tasks/T534-test-m2-sweep-judge-in...

48 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2026-08-03 05:52:02 +00:00
# T534 — test-m2-sweep-judge-integration
> Status: `done`
> Milestone: `M2`
> Kind: `test`
> Est. change: `~200 lines`
## Goal
完成後系統應SW-01SW-06、OP-01OP-07、QT-01QT-02 有整合測試把關,含多實例不重跑情境。
## Depends on
- T531、T532、T533
## Inputs
- Spec`../spec.md` §9.2、§9.5
- 既有測試設施:`apps/backend/internal/testkit/**`、fake AIfake 抓取
## Outputs
### 程式變更(預期路徑)
| 路徑 | 動作 | 說明 |
|------|------|------|
| `apps/backend/internal/module/radar/usecase/m2_integration_test.go` | add | sweep→判定→入庫→截斷 全鏈路 |
| `apps/backend/internal/testkit/**` | edit | fake 抓取來源可設定命中筆數與貼文屬性、fake AI 判定輸出 |
### 行為變更
- 無(測試)。
## Out of scope
- 準確度人工抽驗T535
- 今日頁與回覆T554
## Acceptance
- [x] 15 個 ID 各有具名 test case命名可對回 spec ID
- [x] 多實例情境:兩個模擬 worker 只有一個執行同一 Job
- [x] 指令:
```bash
cd apps/backend && go test ./internal/module/radar/... -count=1 && make test-integration
```