HN2new | past | comments | ask | show | jobs | submitlogin
The Flawed Theory Behind Unit Testing (michaelfeathers.typepad.com)
27 points by kirubakaran on June 12, 2008 | hide | past | favorite | 5 comments


Nice article, but provocative title.

Essentially it comes down to that TDD works mainly because it forces you to think about the implementation more clearly before you begin coding, while the various benefits of automation come as a bonus.


Is Clean Room Software Development orthogonal to Test Driven Development or not? Clean Room minimises tests; Test Driven maximises tests. Clean Room minimises side-effects when code is written; Test Driven minimises side-effects when code is changed.


I think I agree with this. We do TDD and the first test we write for a new module is usually a high-level test that walks entirely through the process, touching several classes or libraries. Then we write smaller tests, working our way down to fine-grained level with multiple tests for individual classes/functions. We catch errors at every level, and the end result is (usually) clean, bug-free code.

My understanding is that this is frowned upon from a TDD purist standpoint. Our high-level tests that touch lots of areas of code probably wouldn't be written in most shops.


Well, shouldn't the quality be defined first. Quality differs based on situations, people, etc.


Talk to Phaedrus about that one.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: