Wrong coverage number


I use coverlet to analyze code coverage and as you can see it from this build: https://ci.appveyor.com/project/Giorgi/entityframework-exceptions/builds/32130967 it reports about 72% code coverage. On the other hand https://codecov.io/gh/Giorgi/EntityFramework.Exceptions reports 62%. The same report is uploaded to coveralls as well and it is reported correctly: https://coveralls.io/github/Giorgi/EntityFramework.Exceptions


1 Like

Hi @Giorgi, thanks for writing in. This actually has to do with how we calculate coverage. You can read about it here: https://docs.codecov.io/docs/frequently-asked-questions#section--how-is-coverage-calculated-

Short story is that we do not consider partially covered lines to be covered.

If you take a look at the Appveyor build at the bottom

and the Codecov build

You’ll see that the Appveyor (and presumably Coveralls) considers partials lines to be covered.

For example, for EntityFramework.Exceptions.Sqlite, you see that we are showing 69.23% for 9 lines covered over 13. If you include the partial line (10/13 = 76.92%), you see it match with what is showing in CI. The same came be done for each file.