Files
ISISeg/工程分析/测试方案-2026-05-18-17-40-02.md

42 lines
1.5 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-05-18-17-40-02
## 自动化测试
1. 算法单元测试
- 使用合成含导丝图像验证每种方法能输出非空掩膜。
- 验证 `compare` 返回多方法结果。
- 验证指标字段存在且数值范围合理。
2. API 测试
- `GET /api/health` 返回运行状态。
- `GET /api/methods` 返回算法清单。
- `POST /api/segment` 上传合成图片并获得结果 URL。
3. 启动验证
- 启动服务后访问首页。
- 调用健康检查接口。
- 使用合成演示视频跑一次分割。
## 手工验证
- 在浏览器打开 `http://127.0.0.1:8000`
- 上传 `storage/samples/synthetic_guidewire.mp4`
- 分别选择 `fusion``compare`,检查叠加结果、掩膜和视频下载链接。
## 验收标准
- 项目可通过启动脚本运行。
- Web 页面可打开并完成上传分割流程。
- 至少三种分割方式可选择,融合和对比模式可用。
- 测试命令通过,或明确记录未通过原因与处理方式。
## 执行结果
- `bash scripts/generate_sample.sh`:通过,已生成 `storage/samples/synthetic_guidewire.mp4``storage/samples/synthetic_guidewire.png`
- `pytest -q`通过4 个测试全部通过。
- `curl http://127.0.0.1:8001/api/health`:通过,返回 `status=ok`
- `curl http://127.0.0.1:8001/`:通过,首页返回 HTTP 200。
- 使用合成视频调用 `POST /api/segment`:通过,返回 3 帧分割结果与叠加视频链接。