Commit Graph

4 Commits

Author SHA1 Message Date
woan 373a8bd6fa feat: 必测项自动化锚点 + 动态设备锚点 + 双协议网络切换 + ONES mutation 回写
ONES 回写:
- ones-sync 改为 ones graphql mutation(updateTestcasePlanCase/Step),修复 token 打码导致的 401;支持 step 级回写、按 case 聚合
- gen-writeback-params.ts + ones-writeback-params.json:固化用例/步骤 uuid,给 plan 链接即可回写

必测项锚点(reporter.record 名带 [P0][ONES:号(#step)][协议],it 标题带 [ONES:号] 备注):
- 添加:15 个 connect
- 控制:bot/color_bulb/lock/plug/strip_light/fan/sensor/humidifier/ceiling_light/curtain/meter/urc(双协议,PROTO 切换)
- 同品类多型号:ones-anchor.helper 动态解析(curtain/lock/plug/sensor/humidifier/hub/meter/robot),换 <CAT>_DEVICE 重跑分别回写

双协议网络前置(network.helper + driver.activateApp):
- Android adb(svc wifi + am start 蓝牙设置点 switch_widget;实测 svc bluetooth 不可用)
- iOS 系统设置 UI(蓝牙 name=BLUETOOTH / WiFi name=无线局域网,iOS26.5 实测)

测试计划:generate_test_plan.py 重构为优先级四层(必测项→探索→全功能→平台)+ AI人力估算 + 双平台/夜测/硬件并行;去除机械臂4款(82→78)
提示词:must_test_conversion / ones_to_automation(含 iOS 快速连接) / test_plan_conversion

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 16:10:57 +08:00
woan fda826446a fix(ones-sync): step 回写按 ONES 形态列全量 step
经实测确认 ONES 写接口形态:case result 可保持 to_do,只在跑过的 step 上
填 execute_result,未跑 step 仅列 uuid,且需列出该用例全部 step。

- OnesStepResult.execute_result 改为可选(未跑 step 只带 uuid)
- buildAnchoredPayloads 支持 fullStepsByNumber:列全量 step,
  全部跑完才聚合 case 结果(passed/failed),否则保持 to_do
- fetchCaseSteps: 取用例全部 step uuid
- sync 脚本对含 step 锚点的用例先拉全量 step 列表再回写

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 15:49:22 +08:00
woan 88435b0ffc feat(ones-sync): step 级结果回写支持
- buildAnchoredPayloads: 按测试名锚点 [ONES:号(#step)] 精确匹配,
  step 级结果填入 step.execute_result,并聚合出 case 级结果(fail>skip>pass)
- postPayloads: 抽出的批量 POST,syncResultsToOnes 复用
- sync-ones-results.ts: 锚点优先 + LCS 兜底,dry-run 打印完整 payload 供核对

注: 控制必测 2 条超级用例(15974/15975)按 step 回写;step 执行结果字段
用 execute_result(待一次受控 live 写入验证字段被接受)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 15:01:10 +08:00
woan e33b042c69 feat: AI Hub 测试完善 + ONES 同步 + 必测项转换提示词
- tests/aihub/*: 侦测/勿扰/回放/本地存储/日报/AI事件等用例修正与扩展,
  新增投屏(aihub_screen_casting)、AI Hub Show(tests/aihubshow/) 与 setup helper
- utils/ones-sync.ts + scripts/sync-ones-results.ts: 测试结果反写 ONES 测试计划
- drivers/hubshow-driver.ts、firmware/test-reporter helper、device.config 更新
- docs/: UI自动化测试计划 + 生成脚本
- prompts/: 新增 must_test_conversion.md 必测项专项子提示词,
  主提示词 ones_to_automation.md 增加子提示词组合引用

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 11:04:12 +08:00