test-case-strategy/SKILL.md
基於風險分析設計測試策略,選擇最適合當前脈絡的測試層級與方法。不用於不需測試的探索性任務,不用於已有明確定義的單一測試類型任務。
npx skillsauth add laitszkin/apollo-toolkit test-case-strategyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
基於當前需求與架構脈絡,規劃完整的測試策略。
測試策略的形狀(Pyramid / Trophy / Diamond)是脈絡分析的結果,不是起點。 從以下決策軸推導出適合當前專案的測試分布:
風險 → 邊界 → 驗證機制
(什麼重要) → (在哪驗) → (怎麼驗)
理解用戶需求。同時,閱讀相關代碼實作,了解可用的測試方式與當前架構。
對每個需求,評估以下面向:
可能性 × 影響度 = 風險等級
測試邊界判斷:
references/integrated-pbt.md整合式 PBT 特別適合:工作流引擎、訂單狀態機、資料庫同步、或有明確不變性(如總金額守恆)的系統。
根據步驟 2 的分析結果選擇測試方法,並記錄決策理由。
閱讀相關參考資料,了解不同場景下常見的測試策略設計。
為每個測試案例記錄:
若跳過某測試層級,記錄跳過理由。
以下模型是常見的測試分布結果,可作為參考而非規範:
| 專案類型 | 常見分布 | 原因 | |----------|----------|------| | 前端 SPA | Integration 為主,Unit 中等,E2E 少量 | 元件整合是核心風險,Testing Trophy 模式 | | 後端 API | Integration 為主,Unit 中等,E2E 少量 | DB/外部服務整合是關鍵,Testing Diamond 模式 | | 微服務 | Unit 為主,Integration 中等,E2E 最少 | 服務隔離是重點,Test Pyramid 模式 | | 全端 Monolith | 混合分布 | 依層級混合最佳策略 |
每個專案的最終形狀應由實際的風險分析決定,而非套用固定模型。
references/unit-tests.md:單元測試與 drift check 設計references/property-based-tests.md:property tests 的選擇與 oracle 設計references/integrated-pbt.md:整合式 PBT(stateful / state machine testing)— 跨多步驟的流程正確性與不變性驗證references/integration-tests.md:整合測試與外部狀態場景設計references/e2e-tests.md:E2E 決策與替代規則references/contract-tests.md:合約測試與 API 邊界驗證development
Read a user-specified PDF that marks the week's key financial events, deeply research each marked event with current sources, capture any additional breaking financial developments, and produce a concise Chinese-capable PDF briefing that explains what happened and why it matters.
documentation
Generate long-form videos (more than 10 minutes) by following user instructions and invoking related skills only when needed (`openai-text-to-image-storyboard`, `docs-to-voice`, `remotion-best-practices`). For text inputs, extract a complete long-form story arc, generate fresh storyboard images (no reuse of previously generated pictures), and render a 16:9 animated long-form video.
tools
協助完成自動化版本發佈。同步文檔、更新版本號、推送 tag 並建立 GitHub Release。
development
Incrementally refresh the architecture atlas when the project diagram drifts from actual code. Measures drift before updating to determine scope, then updates the base atlas and re-renders HTML.