Are You Wasting Time With Test Driven Development?(blog.architexa.com)
blog.architexa.com
Are You Wasting Time With Test Driven Development?
http://blog.architexa.com/2010/08/wasting-time-with-test-driven-development/
1 comments
James, I agree with you point, but I don't feel the answer is in just saying that "you're doing it wrong". I think we need to figure out the main cases of such failing TDD instances, document it, and raise awareness so that we can be vigilant - if only to make sure that an inexperienced developer does not make these mistakes.
My personal experiences have shown the following:
* If you're not allowing yourself to write prototyping / exploratory code without tests, you're doing it wrong.
* If the first thought when writing tests for a method / class / etc is "What do I need to mock", you're doing it wrong (mock over-usage is the worst TDD mistake I've ever seen).
* If the tests take too long to run, you're definitely doing something wrong.
I've run the full gamut of extreme white-box testing to full black-box testing. There are merits to both, and there's a time and place for both, but anyone who adheres to strict ideals isn't developing good software, they're doing Agile masturbation.
That said, anyone writing production code without a test suite is making an even bigger mistake than doing any of the above. Building a good test suite is a very hard problem, and you really need to tailor what you build and how you test with your team and your product.