Upgrade to Pro — share decks privately, control downloads, hide ads and more …

阿迪仔,
你為什麼不寫 Unit Test @ TestCorner#14

阿迪仔,
你為什麼不寫 Unit Test @ TestCorner#14

初入資訊界當個 RD,大家都在鼓吹寫 Unit Test,好似沒寫 Unit Test 就是一種罪惡
來自 RD 真實的分享,會讓大家對 Unit Test 的態度從喜歡到厭惡,然後到接受自我
寫 code 就像一盒巧克力,永遠不會知道會遇到什麼千奇百怪的需求
只好努力成為海賊王,成為最自由的碼農
要不要寫測試,自己決定

Avatar for Kudo Chien

Kudo Chien

March 07, 2018
Tweet

More Decks by Kudo Chien

Other Decks in Programming

Transcript

  1. UNIT TEST INTRODUCTION DI in Java Java - Spring -

    Guice Android - Dagger - V1 from Square, V2 from Google - @Inject - Annotation processing
  2. COVERAGE COVERAGE 怎麼算的 ▸ Python ▸ tracing function ▸ Java

    ▸ bytecode ▸ C++ ▸ compiler annotation ▸ 可能造假提⾼高 Coverage ▸ 假 code / commit
  3. COVERAGE COVERAGE ⾼高 != QUALITY 好 ▸ 寫 Unit Test

    的也是 RD ▸ 多數是正向表列列 ▸ 實際例例⼦子 Integration Test 還是必須,QA++
  4. COVERAGE 哪⼀一個 COVERAGE 比較好 ▸ 30% ▸ 50% ▸ 80%

    ▸ 90% ▸ 轎⾞車車測試項⽬目 ▸ 碰撞測試 ▸ 油與⾥里里程測試 ▸ ⾞車車⾊色標準 ▸ ⾞車車體⾼高度
  5. UNIT TEST TDD IS DEAD ▸ 來來⾃自 Ingram Chen ⼤大⼤大的分享

    ▸ Test Driven Development 經驗整理理 ▸ https://ingramchen.io/blog/2014/04/how-i-do-test- driven-development.html ▸ 無法測試的程式 ▸ https://ingramchen.io/blog/2014/04/things-i-dont- test.html