DEV Community

Discussion on: Code Coverage is Useless

Collapse
 
mtrantalainen profile image
Mikko Rantalainen

I agree. Having ten files with full coverage is better than all files with 80% coverage. This is because having full coverage for ten files allows applying mutation testing against those ten files. Once you get the tests good enough that mutation testing cannot find missing tests, then you can be pretty sure that the tests really test the full implementation insteard of simply run every line of code once and cover random part of the actual implementation.

I mean, 100% coverage is not bad thing itself but that does not mean you have good tests in reality.