Files
Nexus/docs/project/testing-workflow-ai-first.md
T

45 lines
1.7 KiB
Markdown
Raw Normal View History

# 测试分工 — Agent 先验、用户终验
**生效**: 2026-06-01
**约定**: 用户明确要求 — 所有测试由 Agent 执行并验证修复通过;用户仅在最后做终验。
## 流程
```
实现 → Agent 自测(L2)→ Agent 修复至通过 → 文档/changelog → 交付「终验清单」→ 用户终验(L5 业务确认)
```
## Agent 必须完成(有记录)
| 类型 | 做法 | 记录位置 |
|------|------|----------|
| 后端静态 | `ruff check server/``python -c "import server.main"` | changelog / 终端输出 |
| 前端 | `npm run type-check``vite build`(若改 UI | changelog |
| API | `tests/test_api.py`(本地 `.env` 或生产) | changelog / gate |
| 生产冒烟 | `curl /health``/app/` 200 | `docs/reports/*-production-verification.md` |
| 浏览器 | 关键路径(登录、服务器批量、终端、推送页等) | `docs/reports/*-browser-verification.md` |
## 用户终验(仅一次)
Agent 交付时提供简短清单,例如:
- [ ] 强刷 `/app/` 后批量选择 2 台
- [ ] 登录 / 退出 / 刷新会话
- [ ] (可选)真实 Push / 告警 / 维护窗口 kill 守护
用户勾选即表示接受上线;未勾项由 Agent 继续修,不推给用户代测根因。
## 当前 Agent 已验项(2026-06-01
**全量(非抽测)**`docs/reports/2026-06-01-full-acceptance-report.md`
| 套件 | 数量 |
|------|------|
| `tests/test_api.py` | 25 |
| `tests/test_full_site_api.py` | 28 |
| `frontend/e2e/full-acceptance.spec.mjs` | 15 路由 |
复现:`ssh nexus "cd ... && python3 tests/test_api.py && python3 tests/test_full_site_api.py"` · `cd frontend && npm run test:e2e`
仍仅建议用户终验:WebSSH 真连接、正式 Push、Telegram 测试发送、kill 守护。