# Report Publish

> 汇总全部测试产物到本地静态站点并启动 HTTP 服务（可选推送到 GitHub）。Use when the user asks to publish reports, 发布报告, 报告发布, or build a static site of all test artifacts.

- Skill: `naonaoxu/report-publish` (Agent Skill)
- Install (CLI): `npx skillmds@latest add naonaoxu/report-publish`
- Raw SKILL.md: https://api.skillmd.com/api/skills/naonaoxu/report-publish/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: naonaoxu (https://skillmd.com/u/naonaoxu)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/naonaoxu/report-publish

---


# 测试报告发布（Report Publishing）

## 目的

把流水线全部产物汇总为一个本地静态站点并启动 HTTP 服务，供浏览器访问；可选推送到 GitHub。

## 输入（固定路径）

- `reports/report.html`（pytest-html 报告）
- `reports/执行摘要.md`
- `reports/jira_issues.md` 或 `reports/simulated_jira_bugs.md`（BUG 台账）
- `docs/requirements/需求文档.md`
- `docs/analysis/output_需求分析报告.md`
- `docs/testcases/output_测试用例.md`、`docs/testcases/output_测试用例.xlsx`
- `docs/reviews/output_用例评审报告.md`、`docs/reviews/output_代码评审报告.md`

## 执行步骤

1. **复制产物**：把上述输入文件（存在的才复制）复制到 `reports/site/`。
2. **生成聚合页**：手写 `reports/site/index.html`，包含：
   - 页面标题「测试全流程自动化流水线 - 演示报告站」
   - 按流水线 8 个阶段分组的产物链接（相对路径）
   - 极简样式（无外部依赖，离线可用）
   - 每个链接注明阶段序号与产物说明
3. **启动服务**：检查 8080 端口是否被占用（`curl -s http://127.0.0.1:8080` 不通即未占用），未占用则后台启动：
   `python -m http.server 8080 -d reports/site`
   - 已占用则换 8081、8082……直到成功，最终地址以实际为准。
4. **输出访问地址**：`http://127.0.0.1:8080`
5. **可选（GitHub 推送）**：若当前会话有 GitHub MCP 工具（`mcp__github__*`），询问用户是否推送到 GitHub 仓库。
   - 无工具或用户拒绝或推送失败 → **直接跳过，不影响主流程**，在输出中说明。

## 输出（固定路径）

- `reports/site/`（含全部产物副本与 index.html）
- 访问地址：http://127.0.0.1:8080

## 质量自检

- [ ] index.html 所有链接指向的文件真实存在
- [ ] 浏览器打开 index.html 可正常跳转各产物
- [ ] HTTP 服务已启动（curl 访问地址返回 200）
- [ ] 站点离线可用（无外部 CDN 依赖）

