go golang TDD Test-Driven Development

Test-Driven Development 翻譯成中文是 「測試驅動開發」

測試驅動開發的重點就是測試先寫,再來寫 Code


在流程上會像是上圖一樣

  1. Write Fail Test Code
  2. Run Fail the Test
  3. Write Code to Pass
  4. Run Pass Test
  5. Refactor

Repeat flow 1 to 5


打完收工