report
它能做什么
这项技能让智能体运行或读取你的浏览器测试,并写出通过、失败和不稳定测试的摘要。适合希望获得简单测试状态更新的开发者和团队负责人。
适用场景
- ✓当有人问今天的测试情况如何的时候。
- ✓当你需要向团队提供失败和不稳定测试摘要时。
- ✓当你的 CI 流水线完成、并希望把结果集中在一处的时候。
技能链接
https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/playwright-pro/skills/report/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我们的测试情况如何?请给我一份简短的失败项摘要。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会读取最新的测试结果;如果没有结果,就先运行测试。然后统计通过、失败、跳过和不稳定的测试数量,写出 Markdown 摘要,并发送到你设置的位置。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Smart Test Reporting
Generate test reports that plug into the user's existing workflow. Zero new tools.
Steps
1. Run Tests (If Not Already Run)
Check if recent test results exist:
ls -la test-results/ playwright-report/ 2>/dev/null
If no recent results, run tests:
npx playwright test --reporter=json,html,list 2>&1 | tee test-output.log
2. Parse Results
Read the JSON report:
npx playwright test --reporter=json 2> /dev/null
Extract:
- Total tests, passed, failed, skipped, flaky
- Duration per test and total
- Failed test names with error messages
- Flaky tests (passed on retry)
3. Detect Report Destination
Check what's configured and route automatically:
| Check | If found | Action |
|---|---|---|
TESTRAIL_URL env var |
TestRail configured | Push results via /pw:testrail push |
SLACK_WEBHOOK_URL env var |
Slack configured | Post summary to Slack |
.github/workflows/ |
GitHub Actions | Results go to PR comment via artifacts |
playwright-report/ |
HTML reporter | Open or serve the report |
| None of the above | Default | Generate markdown report |
4. Generate Report
Markdown Report (Always Generated)
# Test Results — {{date}}
## Summary
- ✅ Passed: {{passed}}
- ❌ Failed: {{failed}}
- ⏭️ Skipped: {{skipped}}
- 🔄 Flaky: {{flaky}}
- ⏱️ Duration: {{duration}}
## Failed Tests
| Test | Error | File |
|---|---|---|
| {{name}} | {{error}} | {{file}}:{{line}} |
## Flaky Tests
| Test | Retries | File |
|---|---|---|
| {{name}} | {{retries}} | {{file}} |
## By Project
| Browser | Passed | Failed | Duration |
|---|---|---|---|
| Chromium | X | Y | Zs |
| Firefox | X | Y | Zs |
| WebKit | X | Y | Zs |
Save to test-reports/{{date}}-report.md.
Slack Summary (If Webhook Configured)
curl -X POST "$SLACK_WEBHOOK_URL" \
-H 'Content-Type: application/json' \
-d '{
"text": "🧪 Test Results: ✅ {{passed}} | ❌ {{failed}} | ⏱️ {{duration}}\n{{failed_details}}"
}'
TestRail Push (If Configured)
Invoke /pw:testrail push with the JSON results.
HTML Report
npx playwright show-report
Or if in CI:
echo "HTML report available at: playwright-report/index.html"
5. Trend Analysis (If Historical Data Exists)
If previous reports exist in test-reports/:
- Compare pass rate over time
- Identify tests that became flaky recently
- Highlight new failures vs. recurring failures
Output
- Summary with pass/fail/skip/flaky counts
- Failed test details with error messages
- Report destination confirmation
- Trend comparison (if historical data available)
- Next action recommendation (fix failures or celebrate green)
常见问题
生成报告需要专门的工具吗?
不需要。它使用 Playwright 的测试结果和标准的 Markdown 摘要。
如果还没有测试结果怎么办?
该技能会先运行测试来生成结果。
报告发送到哪里?
Markdown 报告总会生成。如果已配置,它还可以发送到 TestRail、Slack 或 GitHub Actions。
详情
作者的原始描述
Use when asked for a test report or results summary ('test report', 'test status', 'how did tests go').
热度
- GitHub 星标
- 29k
- 排名
- #9480
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-launcher-orchestrator
29k帮你的智能体从一个清晰的目标出发,逐步规划、构建、测试并定时运行你自己账户中的 Claude 托管智能体。
grade-iterate
29k让你的智能体按评分标准为托管 AI 智能体的工作打分,并在固定的轮次内改进,因此它永远不会无限循环。
interview
29k让你的智能体就一个 AI 智能体的想法对你进行访谈,并在任何上线之前,把你的回答整理成一份简单的构建计划。
run-without-you
29k帮你的智能体设置托管 AI 智能体,使其按计划或在某个事件发生时运行,并在启动前检查定时设置。