tdd-workflow
Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.
Target: Software development & testing. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original Chinese text
Topics in the source
- 測試驅動開發工作流程
- 何時啟用
- 核心原則
- 1. 測試先於程式碼
- 2. 覆蓋率要求
- 3. 測試類型
- 單元測試
- 整合測試
此技能確保所有程式碼開發遵循 TDD 原則,並具有完整的測試覆蓋率。 撰寫新功能或功能性程式碼 修復 Bug 或問題 重構現有程式碼 新增 API 端點 建立新元件 總是先寫測試,然後實作程式碼使測試通過。 最低 80% 覆蓋率(單元 + 整合 + E2E) 涵蓋所有邊界案例 測試錯誤情境 驗證邊界條件 個別函式和工具 元件邏輯 純函式 輔助函式和工具 API 端點 資料庫操作 服務互動 外部 API 呼叫 關鍵使用者流程 完整工作流程 瀏覽器自動化 UI 互動 為每個使用者旅程建立完整的測試案例: 撰寫最少的程式碼使測試通過: 在保持測試通過的同時改善程式碼品質: 移除重複 改善命名 優化效能 增強可讀性 1. 先寫測試 - 總是 TDD 2. 一個測試一個斷言 - 專注單一行為 3. 描述性測試名稱 - 解釋測試內容 4. Arrange-Act-Assert - 清晰的測試結構 5. Mock 外部依賴 - 隔離單元測試 6. 測試邊界案例 - Null、undefined、空值、大值 7. 測試錯誤路徑 - 不只是快樂路徑 8. 保持測試快速 - 單元測試每個 < 50ms 9. 測試後清理 - 無副作用 10. 檢視覆蓋率報告 - 識別缺口 達到 80%+ 程式碼覆蓋率 所有測試通過(綠色) 無跳過或停用的測試 快速測試執行(單元測試 < 30s) E2E 測試涵蓋關鍵使用者流程 測試在生產前捕捉 Bug -- 記住:測試不是可選的。它們是實現自信重構、快速開發和生產可靠性的安全網。
- Source repository
- affaan-m/ECC
- Source file
- docs/zh-TW/skills/tdd-workflow/SKILL.md
- Fixed revision
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Requirements
- Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.
A small first task
先阅读原作者说明,再决定是否在自己的 AI 工具中使用。
Instructions for your AI tool
- Claude Desktop: resource-specific guide not available yet
- Claude Code: resource-specific guide not available yet
- Cursor: resource-specific guide not available yet
- Codex: resource-specific guide not available yet
Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T15:01:42.777Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.