58 lines
2.1 KiB
Markdown
58 lines
2.1 KiB
Markdown
# 2026-06-08 — 全站测试用例 Wave 1–4 落地
|
||
|
||
## 摘要
|
||
|
||
按计划补齐 IT/CH/E2E 自动化:推送 accepted、链条 WS、12 条集成测试、5 条链条测试、14 条 Playwright 页面 spec;CI 分层跑 pytest;验收脚本支持 `--with-chain` / `--with-integration`。
|
||
|
||
## 动机
|
||
|
||
落实 `docs/testing/test-case-matrix.md` 中 ~78 条待写用例,MCP 可自动化项沉淀为 Playwright(可 CI)。
|
||
|
||
## 涉及文件
|
||
|
||
### 后端
|
||
- `tests/conftest.py` — fixtures、`integration_env`、`mock_request`
|
||
- `tests/integration/test_*.py`(7 文件,12 用例)
|
||
- `tests/chain/test_*.py`(5 文件)
|
||
- `tests/test_batch_server_display_name.py` — 修正 import(CI 收集错误)
|
||
|
||
### 前端 E2E
|
||
- `frontend/e2e/helpers.mjs`
|
||
- `frontend/e2e/pages/*.spec.mjs`(11 spec)
|
||
- `frontend/e2e/full-acceptance.spec.mjs` — 复用 helpers
|
||
- `frontend/package.json` — `test:e2e` 跑整个 `e2e/`
|
||
|
||
### CI / 验收
|
||
- `.gitea/workflows/ci-cd.yml` — fast pytest + chain job
|
||
- `scripts/run_nexus_acceptance.py` — `--with-chain`、`--with-integration`、Playwright 全目录
|
||
- `tests/acceptance_catalog.py` — integration/chain/ui_executions
|
||
|
||
### 文档
|
||
- `docs/testing/test-case-matrix.md` — 状态更新
|
||
|
||
## 迁移/重启
|
||
|
||
无 DB 迁移。CI 需已安装 `pytest-asyncio`。
|
||
|
||
## 验证
|
||
|
||
```bash
|
||
.venv/bin/pytest tests/integration tests/chain -q
|
||
.venv/bin/pytest tests/ -m "not chain and not slow" -q # 注意既有 test_batch_server_display_name 收集错误需另修
|
||
cd frontend && NEXUS_E2E_BASE=http://127.0.0.1:8600 NEXUS_E2E_PASSWORD=*** npm run test:e2e
|
||
python scripts/run_nexus_acceptance.py --with-integration --with-chain
|
||
```
|
||
|
||
## 续补(同日前半)
|
||
|
||
- `tests/integration/test_webssh_auth.py` — IT-TERM-001
|
||
- `tests/integration/test_schedules.py` — IT-SCH-001
|
||
- `tests/chain/test_agent_dashboard_flow.py` — CH-AGT-001
|
||
- `tests/chain/test_server_update_flow.py` — CH-SRV-001
|
||
- `frontend/e2e/pages/login.spec.mjs` — MCP-AUTH-001
|
||
- `.gitea/workflows/ci-cd.yml` — main 分支可选 E2E job
|
||
|
||
## 剩余 manual-only
|
||
|
||
`MCP-TERM-001`(真 SSH)、`MCP-INST-*`、`CH-BAT-001`、`IT-INST-001` 等。
|