Are You Wasting Time With Test Driven Development?(blog.architexa.com) |
Are You Wasting Time With Test Driven Development?(blog.architexa.com) |
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.