auto-sync: 2026-06-05 23:51:28
This commit is contained in:
+22
-4
@@ -44,17 +44,35 @@ pytest -m review # 审查/Rebuttal
|
||||
|
||||
## E2E 怎么跑
|
||||
|
||||
### 场景测试(严格串行,一个一个来)
|
||||
|
||||
```bash
|
||||
# 1. 确认 daemon 在线
|
||||
pm2 list | grep sanguo-moziplus-v2
|
||||
|
||||
# 2. 跑 E2E(串行场景,一个一个来)
|
||||
RUN_INTEGRATION=1 pytest tests/e2e/test_e2e_scenarios.py -v
|
||||
# 2. 逐个跑场景测试(关键:一个完成再跑下一个)
|
||||
RUN_INTEGRATION=1 pytest tests/e2e/test_e2e_scenarios.py::TestS9RealAgentDispatch -v
|
||||
# → 通过?跑下一个。失败?分析根因、修复、重跑当前,不跳过
|
||||
|
||||
# 3. 场景全通过后,跑压力测试
|
||||
RUN_INTEGRATION=1 pytest tests/e2e/test_e2e_scenarios.py::TestS10FullChain -v
|
||||
# → 以此类推,逐个推进
|
||||
|
||||
# 或者一次跑全部(pytest 默认串行,但无法在失败时停下来分析)
|
||||
RUN_INTEGRATION=1 pytest tests/e2e/test_e2e_scenarios.py -v --exitfirst
|
||||
# --exitfirst 遇到第一个失败就停,方便定位问题
|
||||
```
|
||||
|
||||
**串行原则**:一个 case 跑完 → 收集结果 → 根因分析(如有问题)→ 修复 → 重跑当前 → 通过后再跑下一个。用时间换可靠性。
|
||||
|
||||
### 压力测试(场景全通过后)
|
||||
|
||||
```bash
|
||||
RUN_INTEGRATION=1 pytest tests/e2e/test_e2e_stress.py -v
|
||||
```
|
||||
|
||||
# 4. 跑完后检查是否有残留
|
||||
### 跑完后检查残留
|
||||
|
||||
```bash
|
||||
curl -s http://localhost:8083/api/projects | python3 -c "
|
||||
import sys, json
|
||||
projs = json.load(sys.stdin)
|
||||
|
||||
Reference in New Issue
Block a user