TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Are You Wasting Time With Test Driven Development?

6 pointsby sethrqalmost 15 years ago

1 comment

jameskiltonalmost 15 years ago
For all these points, the real answer is "you're doing it wrong." TDD is supposed to, over the course of the project, allow faster development, allow easier and safer refactoring, and overall allow you to feel confident in the system you've built.<p>My personal experiences have shown the following:<p>* If you're not allowing yourself to write prototyping / exploratory code without tests, you're doing it wrong.<p>* 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).<p>* If the tests take too long to run, you're <i>definitely</i> doing something wrong.<p>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.<p>That said, anyone writing production code <i>without</i> 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.
评论 #1581068 未加载