生成日期:2026-11-01 | 模式:discovery-only(发现/跟踪) 本仓库的 tdd-orchestrator 定位为「发现 / 格式化 / 跟踪已有测试」,实际跑测试在开发机完成 (需 mvn / MySQL / 已配好的 Python 环境)。本沙箱负责发现、编目、规划与进度跟踪。
| 来源 | 文件数 | 用例/方法 |
|---|---|---|
结构化用例 tests/test-cases/*.md |
9 | 678 |
Playwright tests/**/*.spec.js |
70 | 411 |
Python pytest(cfc-langgraph + tools/xaf_agent_hub) |
12 | 47 |
Java 后端 @Test(cfc-backend/src/test/java) |
182 | 1379 |
用户场景 tests/user-scenarios/*.md |
8 | 文件级 |
| 合计 | — | 2515 |
后端 Controller 共 357 个、handler 方法 1933,已覆盖仅 199(10.3%),未覆盖 271 个。
缺口 = 当前测试源中没有任何 handler 被命中的 Controller。这是发现出的真实缺口,非发明。
| 模块 | 未覆盖 | 总数 | 覆盖率 | 优先级 |
|---|---|---|---|---|
admin(运营后台) |
103 | 120 | 14% | P0 |
guide(规划师) |
14 | 19 | 26% | P1 |
family(家庭) |
8 | 15 | 47% | P1 |
mind(心理) |
6 | 8 | 25% | P2 |
assessment(测评) |
5 | 6 | 17% | P2 |
diet / recommendation / fatloss / task / wealth / user 等 |
各 3–5 | 0% | — | P2/P3 |
admin 占全部未覆盖的约 38%,且多为核心管理接口,补测收益最高。
cd cfc-backend
mvn -q -DskipTests compile
# 只跑不依赖 Spring 上下文 / 数据库的纯单测包
mvn test -Dtest='com.etotem.cfc.unit.**,com.etotem.cfc.util.**,com.etotem.cfc.common.**'
cd cfc-backend
mvn test -Dtest='com.etotem.cfc.integration.**'
# 全量(耗时较长,需完整基础设施):
mvn test
cd cfc-langgraph
python -m venv .venv && .venv\Scripts\activate
pip install -r requirements.txt pytest pysqlite3 # 含 chromadb/langchain/deepface 等原生重依赖
pytest tests -q
cd tests
npm install
npx playwright install chromium
npx playwright test --project=smoke # 冒烟子集
npx playwright test # 全量
.tdd/test-progress.json,按 anchor = source_path#local_id 索引(如 tests/test-cases/admin.md#TC-A-01)。test_inventory.py 即从侧车派生 docs/tdd/test/automation-status.md。.md / .spec.js / .py / .java。发现 / 台账命令(只读):
python <skill>/discover_tests.py --project d:/cfc
python <skill>/test_inventory.py --project d:/cfc
<skill> = C:/Users/iwt/.workbuddy/skills/tdd-orchestrator/scripts
admin 模块(103 未覆盖,核心管理接口),再 guide / family / mind / assessment。通过 / 失败 / 阻塞),再跑 test_inventory.py 刷新共享台账。.tdd/;docs/tdd/test/*.md 可提交推送给测试团队。