DEV Community

Discussion on: The tragedy of 100% code coverage

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

Part of the tragedy is that code coverage doesn't necessarily relate to actual product quality. There is no reason to believe than increasing the coverage number will actually help route out more bugs and keep the product stable.

Programming quality through tests requires specific targetting and deduction. Some code will have may more than 100% coverage, and other bits will have virtually nothing.

Testing also has the potential problem that people rely on tests too much while refactoring code. They assume that since they have tests they can make random changes and will be safe.

Collapse
 
danlebrero profile image
Dan Lebrero

Writing a good test suite is very hard. As you said, requires thinking ;).