Hacker News new | ask | show | jobs
by leptons 432 days ago
I an early start-up is the exception, but my boss didn't. We were still in "stealth mode" and the CTO wanted 100% test coverage on our nodejs based social website, from the very start. 6 months in and we didn't have all that much built, because they couldn't really decide what they wanted us to build. So we built the most well-tested email sign-up form that ever existed, and a bunch of other user-account related stuff too, but then the company completely pivoted at around 6 months and I was now somehow doing PHP programming (which I hate) hacking the code of some ad server and bolting it on to a mobile app (not what we set out to build), and at that point the requirement for tests had been forgotten, because the company was desperate to find any viable path forward. It dissolved about 3 months after that, and now those tests seem pretty pointless.
1 comments

100% coverage is a vanity metric and a waste of time.

Focus on testing the use cases that are important to users, not on covering every single line.

Any number under 100% is also a vanity metric. Focus on why there are test holes and whether they matter.