Guide through Test-Driven Development workflow
Guides developers through Test-Driven Development workflow with phase tracking.
/plugin marketplace add AsiaOstrich/universal-dev-standards/plugin install universal-dev-standards@asia-ostrichfeature or function to implement | 要實作的功能[!WARNING] Experimental Feature / 實驗性功能
This feature is under active development and may change significantly in v4.0. 此功能正在積極開發中,可能在 v4.0 中有重大變更。
Guide through the Test-Driven Development (TDD) workflow: Red-Green-Refactor.
引導測試驅動開發(TDD)流程:紅-綠-重構。
When /tdd is invoked:
當調用 /tdd 時:
See methodology-system for full methodology tracking.
┌─────────────────────────────────────────┐
│ │
│ ┌─────┐ ┌─────┐ ┌─────────┐ │
│ │ RED │ ──► │GREEN│ ──► │REFACTOR │ │
│ └─────┘ └─────┘ └─────────┘ │
│ ▲ │ │
│ └──────────────────────────┘ │
│ │
└─────────────────────────────────────────┘
| Principle | Description | 說明 |
|---|---|---|
| Fast | Tests run quickly | 快速執行 |
| Independent | No test dependencies | 無相依性 |
| Repeatable | Same result every time | 可重複 |
| Self-validating | Pass/fail is clear | 自我驗證 |
| Timely | Written before code | 及時撰寫 |
/tdd - Start interactive TDD session/tdd calculateTotal - TDD for specific function/tdd "user can login" - TDD for user story