automation-run-2026-11-08-R94.md 4.7 KB

自动化测试执行记录 · R94(2026-11-08 22:47 ~ 2026-11-09 00:20)

汇报版见 docs/tdd/orchestration/report-test-2026-11-09-0030.md;本文件只记可复现的执行事实与证据路径。

0. 基线与环境

项 值
仓库/分支 d:\cfc · cfclub
起始 SHA 76f29bc65(= origin/cfclub,fetch 后一致)
结束 SHA adb032a61(窗口内研发入库:签名横屏 S1/S2/S3)
工作区 追踪文件仅 M _r0243_agg.json、D cfc-langgraph/tests/qna/test_graph.py;源码级 WIP 0 → 直接在主工作区跑,无隔离树
JDK / Maven D:\jdk1.8.0_25 / IDEA 内置 Maven 3.9.9(which mvn 为空但可用 → 推翻 R93「本节点无 Maven」结论)
负载 CPU 95%(WorkBuddy×4 + opencode 常驻)→ 全量耗时 51:45(R88 46:18)

1. 后端全量(mvn -o -B clean test)

Tests run: 2664, Failures: 38, Errors: 11, Skipped: 4      → passed 2611 = 98.01%
classes=316 (316 XML 一一对应, 1 个 PpidChecker dump 噪声)
testCompile: 322 sources, 0 error
恒等式: @Test 2654 + 参数化展开 26 − @Disabled 4 − 早退截断 12 = 2664 (误差 0)
Total time: 51:45   BUILD FAILURE(仅测试失败)
  • 红类 20 / 红例 49 / 环境型 0。
  • 三层归因:A 23 / B 1 / C 1 / D 24(明细见汇报 §3.1)。
  • 证据:_r94_backend.log、_r94_agg.json(工具 docs/tdd/tools/test_report_metrics.py 聚合)。

2. 前端与管理端

套件 命令 结果
cfc-frontend node node_modules/jest/bin/jest.js 394 例 / 369 过 / 24 红 / 1 skip(24 红全部集中在 __tests__/pages/diet/recommendation.uiRework.test.js,TDD RED)
cfc-web 同上 116/116(17 suites)
tests/ 根级 cd tests && node node_modules/jest/bin/jest.js 23 例 / 7 过 / 16 红(黑盒环境依赖,B-36)

3. 浏览器(本机单节点串行,workers:1)

配置 用例 结果 耗时
playwright.config.live.js admin 5 + frontend 6 + shop 4 15/15 passed 3.7m
playwright.config.health.js health-contract 13 13/13 passed 19.4s
playwright.config.dxbridge.js DX 桥接 2 2 skipped(端点 404 未部署;200 红线断言保留) 9.8s
  • 必须用 live/health/dxbridge 配置:playwright.config.js 的 globalSetup 会跑 reset-db.sh,在 204 节点必然 1045 鉴权失败(B-80)。
  • 首跑 playwright.config.js 记录:E2E Global Setup: Database Reset FAILED(保留为 B-80 证据)。

4. langgraph

维度 结果
本机 venv pytest(tests/,qna 目录已被删除) 44 collected / 32 passed / 12 failed(261.82s),失败集合与 R93 逐例一致:test_analyze 2(B-65)、test_auto_tag 5 + test_chat 1(B-74)、test_intent 4(B-54 本机 key 401)
251 :9000/health 200 {"status":"ok"}(6ms)
251 :9000/api/v1/chat 挂起:75s / 200s 两次探测 0 字节(B-77)
251 :4096 派发 会话创建 + prompt 投递均 200(/api/session/{id}/prompt 需 body 含顶层 text);agent 回报 未找到 cfc-langgraph 目录(B-78)

5. 本轮新增/修改的测试资产

文件 变更 结果
cfc-frontend/__tests__/pages/growth-main/growthGrid.layout.test.js 新增 4 例(守护 3e93a9372 三列容差,slack≥4rpx) 4/4 绿
cfc-frontend/__tests__/pages/signature/signature.landscape.test.js 新增 7 例(TC-SIG-01/01b/01c/02/04/04b/03-E,验证 adb032a61 实现) 7/7 绿
tests/e2e-live/dx-health-bridge-auth.spec.js 404 不再计 pass;未鉴权 200 判失败 2 skipped(原 2 passed 假绿)
tests/test-cases/signature.md 状态行改为「已实现·已可执行化」 文档

6. 复现命令(可照抄)

# 后端
cd cfc-backend && JAVA_HOME=D:/jdk1.8.0_25 \
  "C:/Program Files/JetBrains/IntelliJ IDEA 2025.2.5/plugins/maven/lib/maven3/bin/mvn.cmd" -o -B clean test
# 聚合
python docs/tdd/tools/test_report_metrics.py --reports cfc-backend/target/surefire-reports --out-json _r94_agg.json
python docs/tdd/tools/test_report_metrics.py --repo-root . --scene
# 前端
cd cfc-frontend && node node_modules/jest/bin/jest.js
cd cfc-web && node node_modules/jest/bin/jest.js
cd tests && node node_modules/jest/bin/jest.js
# 浏览器(串行,单节点单任务)
cd tests && node node_modules/@playwright/test/cli.js test --config=playwright.config.live.js --reporter=line
cd tests && node node_modules/@playwright/test/cli.js test --config=playwright.config.health.js --reporter=line
# langgraph
cd cfc-langgraph && ./.venv/Scripts/python.exe -m pytest tests/ -q -p no:cacheprovider