Files
IOT_SIM/samples/p4-t2-网络摄像机/checks.yaml
T
xuyueandClaude Opus 5.5 6b088240da
CI/CD / test (push) Canceled after 0s
CI/CD / deploy (push) Canceled after 0s
项目 4 任务 2 网络摄像机:PictureBox、Image / Bitmap、照片列表
- 摄像头:自绘东围墙场景(Camera/scene.svg),按云台位置切成 640×480 帧(build-frames.ts);
  Pan 每次转一格,红外对射被遮挡时画面出现翻墙的人;类名、委托、事件参数与教材 dll 一致,
  ImageRead 每 250 ms 在后台线程触发
- Image / Bitmap 保存真实图片数据:Save、FromFile、FromStream,文件夹不存在时报 GDI+ 一般性错误;
  图片每张只发给浏览器一次(按内容哈希缓存)
- 程序所在目录(AppDomain.CurrentDomain.BaseDirectory,编译检查单独放行)和当前目录指向可写的 bin/Debug,
  沙箱里在沙箱的临时目录
- PictureBox(SizeMode、BorderStyle);设计器工具箱加"图片框";运行区显示程序保存的图片,点开看大图;
  实训台摄像头图标显示开启状态
- 评分规则加图片框显示图片、摄像头开关与转向、保存图片三种检查;示例 p4-t2-网络摄像机
- 测试:摄像头端到端、图片读写与程序目录、AppDomain 编译检查、评分出错情况

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:58:09 +08:00

41 lines
1.5 KiB
YAML

# 评分规则:书上评价表的功能项。每项单独启动一次程序,按步骤操作,核对结果。
# 格式说明见 server/src/grading/checks.ts
- title: 能正确打开、关闭摄像机
steps:
- text: { control: txt_ip, value: 192.168.2.50 }
- click: btn_open
- expect: { control: btn_open, text: 关, desc: 按钮文字变成"关" }
- expect: { camera: on }
- click: btn_open
- expect: { control: btn_open, text: 开, desc: 按钮文字变回"开" }
- expect: { camera: off }
- title: 能正确显示图像
steps:
- text: { control: txt_ip, value: 192.168.2.50 }
- click: btn_open
- expect: { control: pictureBox1, image: true, within: 3s, desc: 显示摄像机拍到的图像 }
- title: 能控制摄像机上下左右旋转
steps:
- text: { control: txt_ip, value: 192.168.2.50 }
- click: btn_open
- click: btn_up
- expect: { camera: up, desc: 点"↑"后向上转 }
- click: btn_left
- expect: { camera: left, desc: 点"←"后向左转 }
- click: btn_down
- click: btn_down
- expect: { camera: down, desc: 点"↓"后向下转 }
- click: btn_right
- click: btn_right
- expect: { camera: right, desc: 点"→"后向右转 }
- title: 能抓拍摄像机当前图像
steps:
- text: { control: txt_ip, value: 192.168.2.50 }
- click: btn_open
- expect: { control: pictureBox1, image: true, within: 3s, desc: 显示摄像机拍到的图像 }
- click: btn_camera
- expect: { savedImage: Camera/, desc: 把照片保存到 Camera 文件夹 }