Wrong coverage number

Description

I use coverlet to analyze code coverage and as you can see it from this build: AppVeyor it reports about 72% code coverage. On the other hand Codecov reports 62%. The same report is uploaded to coveralls as well and it is reported correctly: Giorgi/EntityFramework.Exceptions | Coveralls - Test Coverage History & Statistics

Repository

1 Like

Hi @Giorgi, thanks for writing in. This actually has to do with how we calculate coverage. You can read about it here: Frequently Asked Questions

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
https://ci.appveyor.com/project/Giorgi/entityframework-exceptions/builds/32130967

and the Codecov build
https://codecov.io/gh/Giorgi/EntityFramework.Exceptions/tree/151e1633930de300963497b5143978f5ddc1b08a

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.