first commit

This commit is contained in:
strepsiades
2026-03-09 16:31:42 +08:00
commit 4a9c444b10
486 changed files with 52479 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
# 测试说明
## 目录结构
- `tests/unit/`:状态机运行时、策略辅助、工具链严格性、模块导入面等快速单元测试。
- `tests/integration/`copy pipeline、多节点 full pipeline、UI API 烟测、状态事件覆盖等集成测试。
- `tests/fixtures/``tests/mocks/`:可复用测试夹具与 Mock 数据源。
## 运行方式
- 全量:`pytest -q`
- 单元:`pytest tests/unit -q`
- 集成:`pytest tests/integration -q`
- 工具链专项:`pytest tests/integration/test_toolchain_config_and_graph.py -q`
- UI 专项:`pytest tests/integration/test_ui_api_smoke.py -q`
## 设计原则
- 不绕过 schema/状态机校验;配置错误必须显式失败。
- 单元测试聚焦纯逻辑,集成测试覆盖流水线与边界行为。
- 所有测试均从仓库根路径解析配置,避免目录迁移导致路径脆弱。
- 保留高价值回归测试,移除仅重复路径或无断言价值的历史脚本型测试(脚本保留在 `scripts/`,不纳入 pytest)。
## 质量目标
- 覆盖 `sync_state_machine` 主模块导入面,尽早发现模块级破坏。
- 覆盖状态机配置校验与渲染工具链。
- 覆盖 UI 基础 API 健康检查。
- 覆盖核心业务链路(bind/create/update 与 full pipeline)。
## 大规模自动回归
- 按轮迭代的大规模自动测试方法见 [docs/auto_test_spec/agent_auto_test_method.md](docs/auto_test_spec/agent_auto_test_method.md)。
- 执行时优先采用“单 domain 复现 -> 修复/分类 -> 全量聚合回归 -> 记录总计变化”的节奏,避免一次携带过多上下文。