dopoto
dopoto

Reputation: 1274

TeamCity 9.0.1 - not all assemblies show in Coverage Breakdown

I have a Visual Studio solution consisting of several projects. I set a build process for it in TeamCity, and I have added a an NUnit runner build step, with these settings:

In the Code Coverage tab of the build, under Coverage Breakdown, I can only see:

MyProject.Web, the object of the tests, and a few other assemblies in the solution are not displayed there, and are ignored by the dotCover code coverage calculations. Why? How can I tell it which assemblies to use?

I've unsuccessfully tried various +: / -: combinations in the Filters field. But with Filters empty, I am expecting MyProject.Web to be included, since MyProject.Domain is - why isn't it included?

Upvotes: 3

Views: 974

Answers (2)

mdisibio
mdisibio

Reputation: 116

Are you building in Release or Debug mode? I had the same problem with Release mode and had to enable PDB output which is what dotCover requires to determine the code coverage. PDB is not enabled by default for Release builds.

To enable it go to Project Settings -> Build -> Advanced (button at the bottom) -> Debug Info -> Choose "pdb-only" or "full".

Additionally, dotCover provides this statement when no code coverage can be determined. It may be helpful to check all of the reasons listed:

No executable code was detected.

The issue could be caused by one of the following:

  • Include / exclude patterns are incorrect
  • Assemblies are compiled without debugging information
  • .pdb files are not available
  • Visual Studio code coverage is enabled for MSTest
  • .testrunconfig is used for MSTest and Visual Studio code coverage is not disabled (CodeCoverage section with enable="true" is present)

Upvotes: 1

Maria
Maria

Reputation: 526

I'm afraid without log files and your snapshot it will be difficult to provide the right answer. Please submit a request and attach the files: http://dotnettools-support.jetbrains.com/anonymous_requests/new

If logs are not enabled yet, add the corresponding parameter to your build configuration to activate them: https://confluence.jetbrains.com/display/TCD9/Reporting+Issues#ReportingIssues-dotCoverIssues

Upvotes: 0

Related Questions