4 ms·
Code coverage is good at telling you how much of the code is covered with tests. If the code coverage is low, you have a problem. If the code coverage is high,
by nahname 14y ago
Code coverage is good at telling you how much of the code is covered with tests. If the code coverage is low, you have a problem. If the code coverage is high, that doesn't mean anything about the quality of the code nor the quality of the tests.
I will take 100% coverage with good tests over anything else any day of the week. That is the ideal. I've never seen this.
- jevinskie 14y agoSQLite has not just 100% statement coverage but also 100% branch coverage! http://www.sqlite.org/testing.html http://www.sqlite.org/testing.html
- twp 14y agoSQLite is awesome, and a true model of just how good software can be. It's also designed by programmers for programmers and has a well-defined API that can be thoroughly tested. It's the perfect module, with an API (SQL) that has been refined over several decades. Less well defined stuff - like interacting with users - is harder to test.
- MartinCron 14y agoThat is the ideal. I've never seen this. I've seen 100% coverage with good tests on specific parts of project. It's not unusual for me to see 100% coverage of an entire class or namespace. But I don't have any problem sleeping at night with less than that in other places.
- pacaro 14y agoI think that key is that the absence of code coverage is a strong negative signal, but the presence is only a weak positive signal.
- StavrosK 14y ago> I will take 100% coverage with good tests over anything else any day of the week. Isn't that obvious/tautological?