Files
ISISeg/工程分析/测试方案-2026-05-18-22-23-07.md

70 lines
2.8 KiB
Markdown
Raw Permalink 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-22-23-07
## 自动化测试
- `python3 -m compileall backend tests`
- `node --check frontend/app.js`
- `pytest -q`
执行结果:全部通过,`pytest -q``5 passed`
## Docker/Compose 校验
- `docker compose -f docker_compose.yaml config`
- `docker compose -f docker_compose.yaml --profile frpc config`
- `docker compose -f docker_compose_huijutec.yaml config`
- `docker compose -f docker_compose_Nas.yaml config`
- `docker build -t isiseg:docker-package-test .`
- 运行容器并请求 `/api/health`
执行结果:
- 三个 compose 文件及纯净模板 frpc profile 均可解析。
- Docker 镜像构建通过。
- 测试容器 `/api/health` 返回 `{"status":"ok","service":"ISISeg","version":"0.1.0"}`
- 首次使用完整 `requirements.txt` 构建时,`opencv-python` 安装阶段触发段错误;已改为 Docker 专用 `requirements-docker.txt`,使用 `opencv-python-headless` 并保留运行时所需依赖。
## 安装包校验
- 检查三个 tar.gz 都存在。
- 分别列出包内文件,确认包含 compose、Dockerfile、backend、frontend、样例视频和 README。
- 解包后分别执行 compose config 校验。
- 确认安装包内不包含 `__pycache__``.pyc`
执行结果:
| 安装包 | SHA256 |
| --- | --- |
| `isiseg-clean-install-2026-05-18-22-23-07.tar.gz` | `dc62b411877271375b91833a48c933ff1201f87f9710626f4ba637c04eb039d1` |
| `isiseg-huijutec-direct-2026-05-18-22-23-07.tar.gz` | `84df7476152dd98a44b5b6479bd713f639bd12485ee4385559c5571dfba8850e` |
| `isiseg-qnap-nas-2026-05-18-22-23-07.tar.gz` | `f31bb0bc290b0d3e8f68721c16c638964dc80f6ac1a0b4d11063e4dcf80a71dd` |
## Gitea 发布校验
- push main。
- push tag。
- 创建 release。
- 上传三个附件。
- 查询 release 附件列表确认三个包均存在。
执行结果:
- main 已推送到 Gitea。
- tag 已推送:`v2026-05-18-22-23-07-docker-packages`
- release 已创建:`http://192.168.31.5:5002/admin/ISISeg/releases/tag/v2026-05-18-22-23-07-docker-packages`
- release 附件查询结果为 3 个:
- `isiseg-clean-install-2026-05-18-22-23-07.tar.gz`895561 bytes。
- `isiseg-huijutec-direct-2026-05-18-22-23-07.tar.gz`895096 bytes。
- `isiseg-qnap-nas-2026-05-18-22-23-07.tar.gz`895352 bytes。
## 重新部署校验
- 执行 `docker compose -f docker_compose_huijutec.yaml up -d --build`
- `isiseg_app` 状态为 healthy本机映射为 `0.0.0.0:10004->8001/tcp`
- 本机 `http://127.0.0.1:10004/api/health` 返回 `{"status":"ok","service":"ISISeg","version":"0.1.0"}`
- frpc 日志显示 `proxy added: [ISISeg]``start proxy success`
- 公网 `https://isiseg.huijutec.cn/api/health` 返回健康状态。
- 公网 `https://isiseg.huijutec.cn/` 使用 GET 返回首页 HTMLHTTP 200。