Files
cnc_wams/web-rtcp-5axis-xyzbc-trt-sim-plan/working/17-20260706-暂停按钮严格测试报告.md
2026-07-07 09:40:33 -04:00

116 lines
3.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 2026-07-06 暂停按钮严格测试报告
## 用户提问
严格测试“暂停”按钮的功能。
## 测试目标
`working/14-20260706-xyzbc-trt-暂停按钮严格对标.md` 的预期语义验证:
- 工具栏双竖线按钮对标 AXIS `task_pauseresume`:运行中暂停,暂停中恢复。
- 菜单 `Pause` 对标 `task_pause`:仅 AUTO 且 interpreter 为 reading/waiting 时暂停。
- 菜单 `Resume` 对标 `task_resume`paused 且 AUTO/MDI 时恢复。
- 暂停后速度归零G-code 采样不继续推进DRO、axisPose、canvas toolhead 保持冻结。
## 执行命令和结果
### 1. 构建与回归
```text
npm --prefix app run build
gmoccapy_static_build=ok
npm --prefix app run smoke:node
xyzbc_trt_web_app_smoke=ok
npm --prefix app run smoke:browser
xyzbc_trt_browser_smoke=ok
```
### 2. 暂停位置 JSON trace
命令:
```text
APP_URL_PATH=/web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/index.html node tools/trace-pause-position-json.mjs
```
结果:
```text
pause_position_status=passed-position-frozen
trace=/home/mes123456/cnc_wams/web-rtcp-5axis-xyzbc-trt-sim-plan/working/pause-position-traces/pause-position-20260706T063131Z/trace.json
position_changed=false
changed_fields=
```
关键证据:
```text
pausedSampleCount=35
baselineLabel=pause-start
sampleIndex=48
currentVelocity=0
changedFields=[]
```
暂停开始到最后一个暂停采样期间:
- `runState=paused`
- `taskState=on`
- `mode=auto`
- `interpState=paused`
- `taskPaused=true`
- `sampleIndex=48` 保持不变
- `currentVelocity=0`
- `axisPose``dro``runtimeAxisPose``runtimeTcp``uiExecution.joint``uiExecution.tcp``canvasToolhead` 均无变化
- 暂停按钮状态为 `paused=true`,标题为 `Resume program`
### 3. 50ms 长流程截图验证
命令:
```text
RUN_STABLE_BEFORE_FIRST_PAUSE_MS=3000 node tools/verify-estop-power-home-run-pause-50ms.mjs
```
结果:
```text
verification_status=passed
screenshots=/home/mes123456/cnc_wams/web-rtcp-5axis-xyzbc-trt-sim-plan/working/screenshots/estop-power-home-run-pause-50ms-20260706T063233Z
captured_frames=403
sample_period_ms=50
manifest=/home/mes123456/cnc_wams/web-rtcp-5axis-xyzbc-trt-sim-plan/working/screenshots/estop-power-home-run-pause-50ms-20260706T063233Z/manifest.json
```
关键断言:
| 阶段 | 结果 | runState | mode | interpState | taskPaused | sampleIndex | currentVelocity |
|---|---|---|---|---|---|---:|---:|
| 第一次暂停 | 通过 | paused | auto | paused | true | 111 | 0 |
| 第一次暂停保持 5 秒 | 通过 | paused | auto | paused | true | 111 | 0 |
| 第二次暂停 | 通过 | paused | auto | paused | true | 405 | 0 |
| 第二次暂停保持 5 秒 | 通过 | paused | auto | paused | true | 405 | 0 |
两次暂停都发生在真实展开程序 `helix_bc.ngc` 第 17 行:
```text
f#<frate> g2i#<r>z#<zmin> p#<n>
```
### 4. Web/native evidence
```text
npm --prefix app run evidence:web
web_xyzbc_trt_evidence=/home/mes123456/cnc_wams/web-rtcp-5axis-xyzbc-trt-sim-plan/working/evidence/web-xyzbc-trt-evidence.json
npm --prefix app run evidence:compare
compare_xyzbc_trt_status=pass
```
## 结论
暂停按钮严格测试通过。工具栏暂停/恢复、菜单 Pause/Resume 的回归测试通过;真实浏览器中暂停后状态稳定为 `paused`,速度为 0采样索引不推进DRO/axisPose/runtime/canvas toolhead 均保持冻结;两次 5 秒暂停保持均通过50ms 截图长流程验证通过Web/native compare 仍为 pass。