News for hackers. Stuff that matters.
Re:Ask HN: Do you still use test coverage reports by matthewbunge on Thursday January 14, 2021 @06:53PM (#25784846)
Yes with caveats.

The overall test coverage of the code I'm currently unit testing is 63%. This does not mean the remaining 37% will ever get tested, it means around 63% of the codebase is worth testing. What's more relevant is the individual namespaces. For example: Services is at 100% test coverage, because everything in Services actually does something worth testing. Models.DTO, that's more like 50%. I do not need to test every auto getter and auto setter.

I view test coverage like a log curve, more is better, but the returns can get very diminishing.

As far as the tool, working in C# I use JetBrains dotCover.

There are no comments on this comment yet.