We have a number of projects that build and run tests through TeamCity. For these projects, code coverage is calculated using the dotCover method.
In some cases, it counts the lines twice and, therefore, shows only half the coverage.
The simplest example of this is a single-class namespace. This class is just a list of 6 constants. Thus, it has 6 publicly available static properties.
When we look at the code, it shows all 6 lines in green.
But in statistics, it reports 12 lines, since only (all) 6 are tested, coverage is 50%.
We do not have this problem for all projects or all DLLs in the project, I could not identify any template.
Does anyone know what might cause this problem?
source share