TDD和Unit Test, Accpetance Test的比較

很多時候大家不清楚TDD和Unit test, accpetance test有時麼差別, 因此在撰寫測試時, 都把他們混在一起. 到時候再來說, TDD不work.

小弟整理了一下它們之間的差別, 有經驗的讀者歡迎補充一下

TDD v.s. Unit Test
1. Test first v.s. Test after

2. Unit testing is to confirm whether your programs meet what you expect
3. TDD is to express what your programs should do before the codes are written
- drive the design of an application
- Kent Beck calls incremental design and Martin Fowler calls evolutionary design
  Kent: http://www.amazon.com/Extreme-Programming-Explained-Embrace-Change/dp/0321278658/ref=ntt_at_ep_dpi_4
  Martin Fowler: Is Design Dead?,
http://martinfowler.com/articles/designDead.html

TDD v.s. Accpetance Test
1. Acceptance testing is to verify whether application behaves as a customer expects
2. Audience
- TDD: developer
- Acceptance Testing: customer
3. Tools
- TDD: XUnit like
- Acceptance Testing: Fit, FitNesse, Watir…
3. Execution time
- TDD: fast (Kent Beck: 10 minute rule)
http://www.amazon.com/Extreme-Programming-Explained-Embrace-Change/dp/0321278658/ref=ntt_at_ep_dpi_4
- Acceptance Testing: days/weeks

arrow
arrow
    全站熱搜

    kojenchieh 發表在 痞客邦 留言(1) 人氣()