This is a really good and interesting question, and it's one I've been struggling with myself.<p>The problem boils down to this: TDD makes your software more maintainable (if you do it well) and it lowers your cost of development. <i>However,</i> it also takes significant time and effort to figure out how to test-drive a technology for the first time. Everybody can TDD a Stack class; TDD'ing a database, or a web server, or JavaScript [0] is a <i>lot</i> harder.<p>So the answer seems simple: use TDD for the parts you already know how to TDD.<p>But it's <i>not</i> so simple! It's much harder to add tests to existing code than it is to TDD it from scratch. Sometimes, it's flat-out impossible. The expense is so high, there's a very good chance that you'll <i>never</i> get around to adding tests to the un-TDD'd code. It will hang around causing bugs, preventing refactoring, and sapping your agility forever, or until you rewrite... and a rewrite of any significance will halt your company in its tracks, so you won't do that.<p>So the reality is that, anything you don't TDD from the beginning, you'll probably never be able to TDD. Companies that go down this road find themselves doing a major rewrite several years down the road, and that's crippling [1].<p>There's another wrinkle on top of this: manually testing code and fixing bugs is <i>expensive</i>. Once your codebase gets above a certain size--about six developer-weeks of effort, let's say--the cost to manually test everything exceeds the cost to TDD it. (The six weeks number is a guess. Some people argue it's less than that.)<p>So the real answer is a bit more nuanced:<p>1. <i>If</i> your MVP is truly a throw-away product that will take less than six weeks to build and deploy and you'll <i>never</i> build on it after that, use TDD only where it makes you immediately faster.<p>2. If your MVP is the basis of a long-lived product, use TDD for the parts you know how to TDD and <i>don't do</i> the parts you don't know how to TDD. Be creative about cutting scope. If you must do something you don't know how to TDD, figure it out and TDD it.<p>3. It's okay to be a bit sloppy about TDD'ing the edges of your app that are easily rewritten or isolated in modules. But be very careful about the core of your system.<p>That's my opinion based on 13 years of doing this stuff, including building five successively-less-minimal MVPs over the last nine months for my JS screencast. The first three MVPs were zero coding, the fourth was a throw-away site, and the fifth was TDD'd with aggressive scope cutting to minimize the number of technologies that had to be TDD'd.<p>[0] Shameless plug: I have a screencast on TDD'ing JavaScript that I'll be opening up to the public, on a subscription basis, in a month or so. <a href="http://www.letscodejavascript.com" rel="nofollow">http://www.letscodejavascript.com</a> .<p>[1] Rewrites are crippling: See Joel Spolsky's "Things You Should Never Do, Part I." <a href="http://www.joelonsoftware.com/articles/fog0000000069.html" rel="nofollow">http://www.joelonsoftware.com/articles/fog0000000069.html</a> (There is no Part II, by the way.)