67 lines
3.1 KiB
Markdown
67 lines
3.1 KiB
Markdown
|
|
# 审计 — 全站测试体系交付(2026-06-09)
|
|||
|
|
|
|||
|
|
**Changelog**: `docs/changelog/2026-06-09-full-site-testing-delivery.md`
|
|||
|
|
|
|||
|
|
## 变更文件清单
|
|||
|
|
|
|||
|
|
| 文件 | 说明 |
|
|||
|
|
|------|------|
|
|||
|
|
| `tests/integration/test_*.py` | IT 域集成测试(14 文件) |
|
|||
|
|
| `tests/chain/test_*.py` | 链路测试(8 文件,含 batch/exec 完成态) |
|
|||
|
|
| `tests/conftest.py` | 共享 fixture / SQLite 兼容 |
|
|||
|
|
| `tests/acceptance_catalog.py` | 验收目录扩展 |
|
|||
|
|
| `frontend/e2e/fixtures.mjs` | Worker 级 API 登录 + cookie 轮换写回 |
|
|||
|
|
| `frontend/e2e/helpers.mjs` | 会话恢复 + 侧栏 `nav` |
|
|||
|
|
| `frontend/e2e/pages/*.spec.mjs` | 页域 E2E(18) |
|
|||
|
|
| `frontend/e2e/full-acceptance.spec.mjs` | 15 步 serial 验收 |
|
|||
|
|
| `frontend/package.json` | `test:e2e` 脚本 |
|
|||
|
|
| `.gitea/workflows/ci-cd.yml` | CI 分层 pytest + E2E job |
|
|||
|
|
| `.gitignore` | 忽略 `frontend/e2e/.auth/`、`test-results/` |
|
|||
|
|
| `scripts/run_nexus_acceptance.py` | 验收脚本对齐 catalog |
|
|||
|
|
| `docs/testing/test-case-matrix.md` | 矩阵状态更新 |
|
|||
|
|
| `web/app/index.html` | vite build 入口 hash 更新 |
|
|||
|
|
| `frontend/src/api/index.ts` | 校验错误中文格式化接入 |
|
|||
|
|
| `frontend/src/utils/apiError.ts` | API 错误展示 |
|
|||
|
|
| `frontend/src/utils/validationErrorFormat.ts` | Pydantic detail → 中文 |
|
|||
|
|
| `frontend/src/pages/PushPage.vue` | 推送页异步提交 UX |
|
|||
|
|
| `frontend/src/pages/ServersPage.vue` | 服务器列表(无 CSV 导出) |
|
|||
|
|
| `frontend/src/components/push/PushToolbar.vue` | 推送工具栏 |
|
|||
|
|
| `frontend/src/composables/push/usePushProgress.ts` | 推送进度 composable |
|
|||
|
|
| `server/api/sync_v2.py` | sync 校验与异步推送 |
|
|||
|
|
| `server/background/sync_push_runner.py` | 后台推送 runner |
|
|||
|
|
| `server/utils/validation_errors_zh.py` | 后端校验中文映射 |
|
|||
|
|
| `tests/test_validation_errors_zh.py` | 中文校验单测 |
|
|||
|
|
|
|||
|
|
## Step 3 规则扫描
|
|||
|
|
|
|||
|
|
| 规则 | 结论 |
|
|||
|
|
|------|------|
|
|||
|
|
| 无静默吞错(测试 assert 真实行为) | PASS — 失败用例已修至 green |
|
|||
|
|
| 无明文密钥入仓 | PASS — E2E 密码仅环境变量 |
|
|||
|
|
| 分层:API 不测 UI、E2E 不替代 IT | PASS — 职责分离 |
|
|||
|
|
| E2E 并行不触发 login lockout | PASS — `fixtures.mjs` 每 worker 一次 API 登录 |
|
|||
|
|
| Refresh token 轮换 | PASS — 上下文结束写回 `storageState` |
|
|||
|
|
| SQLite/MySQL 测试兼容 | PASS — `SettingRepository` 等 monkeypatch/直连 |
|
|||
|
|
| CI 不阻塞于缺 E2E secret | PASS — E2E job 条件触发 |
|
|||
|
|
| 推送异步不阻塞 UI / 校验中文 | PASS — sync_v2 + PushPage + validation_errors_zh |
|
|||
|
|
|
|||
|
|
## Closure
|
|||
|
|
|
|||
|
|
| 项 | 结果 |
|
|||
|
|
|----|------|
|
|||
|
|
| pytest integration+chain | 27 passed |
|
|||
|
|
| pytest fast suite | 427 passed |
|
|||
|
|
| pytest slow (IT-INST) | 1 passed |
|
|||
|
|
| Playwright e2e | 35 passed |
|
|||
|
|
| local_integration_smoke | OK |
|
|||
|
|
| pre_deploy_check Gate 3–6 | PASS(本审计前) |
|
|||
|
|
| MCP-INST-001 各 step UI | ⏭ 用户确认不纳入验收 |
|
|||
|
|
|
|||
|
|
## DoD
|
|||
|
|
|
|||
|
|
- [x] Wave 1–5 矩阵 IT/CH/E2E 缺口落地并有命令证据
|
|||
|
|
- [x] Playwright 35/35 本地 green(清理 assets 后复验)
|
|||
|
|
- [x] Changelog + 设计/计划/报告文档齐全
|
|||
|
|
- [x] 门控可过(今日 changelog + 本审计)
|
|||
|
|
- [ ] 生产部署(待用户批准 `deploy-production.sh`)
|