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.

Ask HN: Should my MVP have unit tests?

7 pointsby ssebroalmost 14 years ago
How minimum does minimum really mean? And is no unit tests really faster/better than writing unit tests?

3 comments

latchalmost 14 years ago
If you have to ask, then the answer is probably no, you shouldn't have unit tests.<p>The purpose of MVP isn't to reduce <i>quality</i> in ordet to ship quickly. Also unit testing doesn't really incur an upfront cost - whether you write 50 tests or 1000, time spent is linear. So whether you have 100 features or 5, the time-cost of unit testing doesn't get all crazy/whacky.<p>You either believe in the value of unit tests - to flush out poor design choices and help in refactoring - or you don't.
评论 #2601086 未加载
warren_salmost 14 years ago
We skipped unit tests when we built desksnear.me for the rails rumble, but we DID have a cucumber test suite for integration testing. It wasn't that much of an impost for us, and it meant we spent more time coding, and less time manually testing stuff.<p>I think this approach fits well with the idea of an MVP - you express your minimum set of features in such a way that you can automatically test them, while still freeing yourself to throw away parts of the underlying code if you need to.<p>At the end of the day it's not an all or nothing thing, if there's a particularly gnarly bit of code that you want to unit test, then just unit test it!
ryantoalmost 14 years ago
if you are building something small, like a two or so week project, then sure... skipping tests would allow you to get to the MVP faster.<p>the problem is that when you get to the 5th week you are really going to wish you had tests in place. making quick changes and then being able to run them against a test suite to ensure that everything is working correctly is valuable. this value goes up (in a non linear terms) as you add more and more code into the project.<p>to answer your question: at first writing no tests is faster, later on it becomes much slower. it is probably never better.
评论 #2601647 未加载