report 是一個輕量的 Playwright test reporting skill,可檢查既有 artifacts、在需要時執行測試、解析結果,並產生 Markdown、Slack、TestRail 或 CI-ready 摘要。

Stars22.1k
收藏0
評論0
加入時間2026年7月11日
分類测试自動化
安裝指令
npx skills add alirezarezvani/claude-skills --skill report
編輯評分

此 skill 評分為 68/100,代表可收錄於目錄,但較適合定位為輕量的 Playwright reporting guide,而非完整自動化的 reporting integration。目錄使用者能取得清楚的觸發條件與可用的報告流程,但在 JSON parsing 與外部目的地整合上,仍應預期需要自行補齊部分實作細節。

68/100
亮點
  • 觸發條件明確:frontmatter 清楚將常見使用者語句如 "test report"、"results summary"、"show results"、"how did tests go" 對應到此 skill。
  • 提供實用的 Playwright 導向流程:先檢查既有 `test-results/` 或 `playwright-report/`,必要時以 `json,html,list` reporters 執行測試,擷取通過/失敗/略過/flaky/耗時資料,並產生報告。
  • 包含依環境或 repository 訊號判斷常見輸出目的地的 routing logic,包括 `TESTRAIL_URL`、`SLACK_WEBHOOK_URL`、`.github/workflows/` 與 `playwright-report/`。
注意事項
  • 未附支援檔案、腳本或參考資料,因此 Slack、TestRail、PR comments 等整合,取決於代理程式/使用者是否已知道如何實作。
  • 解析指引稍嫌寬鬆:內容提到讀取 JSON report,但又示範另一個 `npx playwright test --reporter=json` 指令,這可能會重新執行測試,而不是使用既有 artifact。
總覽

report skill 概覽

report skill 可以做什麼

report skill 是一套以 Playwright 為核心的測試報告工作流程,用來把原始測試結果整理成清楚的狀態報告。當使用者提出「test report」、「results summary」、「test status」、「show results」、「test dashboard」或「how did tests go」這類需求時,這個 report skill 特別適合派上用場。它不只是摘要終端機 log,而是引導 agent 檢查既有的 Playwright 輸出、必要時執行測試、解析 JSON 結果,並依照目前交付情境產出有用的報告。

最適合 Test Automation 團隊

這個 report skill 最適合 Test Automation 工程師、QA lead、使用 Playwright 的開發者,以及在需要快速彙整測試結果的 repository 內工作的 agent。若團隊已經使用 test-results/playwright-report/、GitHub Actions、Slack webhooks,或類似 TestRail 的回報流程,它會特別合適。它的主要任務不是產生測試,而是解讀測試執行後的結果,並交付測試狀態。

為什麼比一般 prompt 更實用

一般的「summarize my tests」prompt 常常會漏掉 Playwright 把結果存在哪裡、是否應該重新執行測試,以及最終報告應該送到哪裡。report skill 會加入工作流程判斷:檢查既有 artifacts、在缺少結果時以 JSON/HTML/list reporters 執行 Playwright、萃取 pass/fail/skip/flaky 數量、找出失敗測試與錯誤訊息,並在環境支援時選擇輸出目的地,例如 Markdown、HTML report、CI artifact、Slack 或 TestRail。

重要導入注意事項

上游 skill 很輕量:可見的 repository 路徑中只有 SKILL.md,沒有 helper scripts、rules、references 或 bundled assets。這讓它很容易檢查與調整,但也代表你的 agent 必須依賴本機 Playwright 設定與可用的環境變數。安裝前,請先確認你的專案使用 Playwright,或你能接受把這套工作流程改寫成適用於其他 JavaScript test runner 的版本。

如何使用 report skill

report 安裝情境

從 directory 使用的 repository path 安裝 skill:

npx skills add alirezarezvani/claude-skills --skill report

安裝後,請先檢查 skill source:

engineering-team/playwright-pro/skills/report/SKILL.md

已發布的 skill preview 中沒有額外支援資料夾,因此 SKILL.md 是主要操作指南。在你自己的 repository 中,請檢查 playwright.config.*package.json.github/workflows/test-results/playwright-report/,了解測試輸出如何產生,以及報告應該導向哪裡。

skill 需要的輸入資訊

若要穩定使用 report,請提供足夠脈絡,避免 agent 只能猜測:

  • 測試是否已經執行過
  • 平常用來執行 Playwright 測試的 command
  • 若結果 artifacts 不在標準位置,請提供所在路徑
  • 是否啟用 retries,因為 flaky tests 會從 retry 行為推斷
  • 期望輸出格式:Markdown、PR comment、Slack summary、TestRail push,或本機 HTML report
  • 任何環境限制,例如「do not rerun tests」或「CI only」

較弱的 prompt:

Make a test report.

較好的 prompt:

Use the report skill for this Playwright project. Do not rerun tests unless no recent results exist. Check test-results/ and playwright-report/, parse JSON output if available, summarize passed/failed/skipped/flaky counts, list failed tests with error messages, and produce a Markdown report for the release channel.

實務上的 report 使用流程

一個好的 report guide 工作流程如下:

  1. ls -la test-results/ playwright-report/ 2>/dev/null 檢查既有 artifacts。
  2. 如果沒有可用結果,且允許重新執行,執行:
    npx playwright test --reporter=json,html,list 2>&1 | tee test-output.log
    
  3. 解析 JSON output,取得總數、耗時、失敗項目、skipped tests 與 retries。
  4. 偵測輸出目的地:
    • TESTRAIL_URL 表示可能可以發布到 TestRail。
    • SLACK_WEBHOOK_URL 表示可以發送 Slack summary。
    • .github/workflows/ 表示 CI/PR reporting 可能相關。
    • playwright-report/ 表示可以開啟或提供 HTML report。
  5. 除非使用者只要求單一目的地,否則一律產生 Markdown summary。

提升輸出品質的技巧

請告訴 agent 這份 report 要支援什麼決策。Release manager 需要風險與阻塞因素;開發者需要 failing specs、stack traces 與重現 command;QA lead 可能需要 flaky-test 數量與 duration 趨勢。如果 report 會貼到 PR,請要求精簡摘要。如果是用於 incident review,請要求依 suite、browser 或 error pattern 分組失敗項目。

report skill 常見問題

report 只能用於 Playwright 嗎?

這個 skill 是圍繞 Playwright commands、folders 與 reporters 撰寫,因此用在 Playwright Test Automation 時最準確。你可以把它的結構改用於 Jest、Cypress 或其他 runners,但 commands、artifact paths 與 flaky-test 偵測方式都需要調整。如果你的 repository 沒有 test artifacts,也沒有 Playwright setup,一般 prompt 可能同樣有效。

report 會自動執行測試嗎?

它可以在找不到近期結果時,引導 agent 使用 npx playwright test --reporter=json,html,list 執行測試。不過,你應該明確說明是否允許 reruns。對大型測試套件來說,重新執行可能很慢、成本高,或在 CI failure 後不適合,因為原始執行環境可能才是關鍵。

report skill 會產生什麼?

預設輸出是一份 Markdown test report,包含 passed、failed、skipped、flaky tests 的數量、總耗時,以及 failed-test details。依你的環境而定,這個工作流程也可能將結果導向 TestRail、Slack、GitHub Actions artifacts 或 PR comments,或使用 Playwright HTML report。

什麼情況不適合安裝 report?

如果你的團隊不使用 Playwright、已經有一套具備嚴格 API 的專用 reporting platform,或需要跨多次測試執行的歷史分析,建議先跳過或延後安裝。這個 skill 是精簡的 workflow prompt,不是完整 reporting service、database、dashboard,或 flaky-test management system。

如何改進 report skill

提問前先改善 report 輸入

改善 report 結果最快的方法,是提供清楚的執行邊界。請包含 test command、artifact paths、destination、audience 與 rerun policy。例如:

Generate a report for the CI Playwright run. Use existing artifacts only. Look in test-results/ and playwright-report/. Output a PR-ready Markdown summary with top failures, flaky tests, and whether the build should block merge.

這能避免 agent 浪費時間重新執行測試,或產生不符合需求的細節層級。

處理常見失敗情境

常見問題包括缺少 JSON output、artifacts 過舊、log 過大,以及 retries 語意不清。如果沒有 JSON,請要求 agent 改用 test-output.log 與 HTML report metadata。若 artifacts 可能過期,請要求檢查 timestamp。若 logs 太大,請要求依 failed test title 與第一個有意義的 error message 分組,而不是貼上完整 stack traces。

讓 report 符合團隊流程

由於這個 skill 沒有 bundled scripts,團隊化改進通常會透過新增本機慣例來完成。請記錄你偏好的 report template、Slack channel rules、TestRail project mapping、CI artifact URL pattern 與 severity labels。接著在 prompt 中引用這些慣例,讓 report skill 產生符合 release process 的輸出。

第一份 report 後持續迭代

請把第一份 report 視為草稿。可以提出後續要求,例如:

  • “Group failures by root cause.”
  • “Separate product defects from test infrastructure failures.”
  • “Add rerun recommendations for flaky tests.”
  • “Make this suitable for a non-technical release update.”
  • “Include exact commands to reproduce the failed specs.”

這能讓 report 聚焦於決策,而不只是統計數字。

評分與評論

尚無評分
分享你的評論
登入後即可為這項技能評分並留言。
G
0/10000
最新評論
儲存中...