I'm going through the pains of configuring TeamCity and I've came to the point where I'd like to produce a report for coverage of my code.
As the tests are run (failed, successful and omitted) the software generates an XML file with all three items equal to zero. Checking the report in TC shows 0% coverage, despite a (large) number of test next to them. It looks as follows.
Classes: 0% 0/46 Methods: 0% 0/380 Statements: 0% 0/1533
Diff: 0% Diff: 0% Diff: 0%
Or as in the full report.
Beep 0% (0/1) 0% (0/1) 0% (0/1)
Beep.API 0% (0/6) 0% (0/64) 0% (0/242)
Beep.DAL 0% (0/6) 0% (0/49) 0% (0/362)
...
Now, assuming I'm slow like a retarded banana (given my scarce competence in TeamCity) - what thing might I have forgotten to do (or did unnecessarily)? How can I troubleshoot it?!
I'm trying to use the defaults as far as humanly possible. It's NUnit that comes bundled with TeamCity, as is DotCover. In my local environment I get the coverage to be (at least partly) filled, of course.
After scrutinizing the build log, I've found the following message.
No covered code was detected. The issue could be caused by one of the following:
1. Include / exclude patterns are incorrect
2. Assemblies are compiled without debugging information
3. .pdb files are not available
4. Visual Studio code coverage is enabled for MSTest
5. .testrunconfig is used for MSTest and Visual Studio code coverage is not disabled (CodeCoverage section with enable="true" is present)
(1) shouldn't be a problem because I've used:
+:assembly=*
-:assembly=*.Test
(2) and (3) shouldn't be a problem because I'm compiling to release configuration - no PDB or debug information should be expected.
(4) and (5) shouldn't be a problem because I haven't enabled anything like that in VS.
Or am I missing something important?