Is TDD dead?

Rails creator David Heinemeier Hanson recently (April 23rd) wrote a debate-evoking blog post about TDD and testing.
Check the below Google Hangout debate between DHH, Martin Fowler and Kent Beck in response to this article:


In regards to that, summarizing my recent learning says:
  • testing ensures correctness/coverage, so the tests themselves should not be our main focus.
    • They are there to let me rest assured ("sleep well at night") knowing my code is working as I would expect.
  • The less pronounced reason, is that the point of a test is to do so in as much isolation as possible (whether at unit test level or through some integration/system test "code branch")
    • Attempting to isolate a behavior necessarily forces me to think about whether my code is factored in a way that makes it "possible"...
    • ..."Possible" to isolate behaviors that I believe are "independent" enough to be separately testable.
    • In this light, testing is actually a design aid. (that does not mean to say it CANNOT BE ACHIEVED otherwise!)
  • Self-testing code is the optimum goal here - how you achieve it is more of a detail.
    • It gives you the confidence to extend, re-factor and scale your code in a relatively short time (making project deadlines a reality)


 In the words of DHH, long live testing!

Comments