re: The tragedy of 100% code coverage VIEW POST


I believe that 100% test coverage is not a good idea in applications. However, I find it very very valuable in libraries. I have a few personal recommendations:

  • Avoid white-box testing. It makes refactoring harder. We should be able to achieve 100% test coverage using only the public API of the library.

  • Every reported bug should be reproduced with a unit test before it is fixed. These unit tests are more important than achieving 100% coverage.

code of conduct - report abuse