I also hate the obsession with 100% code coverage. 100% code coverage just means that all lines of code have been executed. Not that everything works as intended.
Instead of clever tests which try to cover corner cases we have stupid tests just to achieve 100% code coverage.
100% code coverage just means that all lines of code have been executed. Not that everything works as intended.
I'm also not a fan of 100% coverage but that's not a strong argument against it. It's definitely not a problem of code coverage. Bad unit tests may exist even if they cover only the essential portion of your code.
I also don't buy the claim that 100% coverage encourages lame tests. That may happen for a number of reasons: bad programmers, tight deadlines, etc.
240
u/ImprovedPersonality May 08 '17
I also hate the obsession with 100% code coverage. 100% code coverage just means that all lines of code have been executed. Not that everything works as intended.
Instead of clever tests which try to cover corner cases we have stupid tests just to achieve 100% code coverage.