Hacker News new | ask | show | jobs
by wpietri 1298 days ago
I'm a huge proponent of good testing, mainly because it's so much easier to work sustainably on a code base with good tests. But I hate, hate, hate test coverage mandates. Every time I've seen them, it's as you say: some people write garbage tests to hit the metric. Before with those people you wouldn't have been able to trust their code. Now you have two problems, because you can't trust their tests either.
1 comments

Sometimes you are forced to write a garbage test because there is not much to say about some simple code in terms of tests.
That's an interesting phrasing. Who forces you?
It's integrated into the build process. The build fails if there are not enough lines covered by tests.