
Ask HN: Startups, do you write unit tests for your projects? - a_seeker
If you are a small startup trying to build a product without a proven market, you need to execute fast. Don&#x27;t get me wrong here, I understand the importance of unit tests. I am asking how many startups are following this in practice? Do you end up skipping them in favor of shipping a feature fast?<p>When you respond, please include the number of developers involved in the product.
======
twobyfour
The first time, no, and regretted it.

The second time, yes, and it was worth it. With 90% coverage, you'll save
yourself and your team several days per month of click testing and bug fixes;
and probably a whole bunch of production bugs.

That's for code that'll go into production, though.

Proof-of-concept code is different. If the code is doing something highly
complex or quantitative calculations, I'll write unit tests to verify output
for various inputs. It's just faster to develop that way. But no tests for
generic CRUD code.

------
iLemming
I have once worked at a startup where CTO literally forbade me writing any
unit tests. - "We're not a consultantcy shop, we're trying to build our own
product, we don't have time to write tests".... I left. Company went bankrupt
a few months later.

------
Servuc
Hi,

At the beginning, we skipped the unit test because it's spending lot of time,
(Chronofage in french :D), we want to get a product !!!

But after of one year, we get lot of indirect regress, all the time. So we
have a product with features, but bugged ...

So we spend 3 weeks (2/2 developers) to add unit tests to all models (With
PHP-Unit and Gitlab-CI), and unit tests for our API (DIY testing script - Run
on dev server).

Actually we do not make unit tests for our frontend, but they will came :)

To conclude, even in StartUp, unit tests ARE NOT F...ING USELESS ^^ We make
test all the time after we add a functionnality.

Hope we help you ;)

Servuc

