1

I'm trying to setup partcover for .net 4 on x64 machine with TeamCity.

Tests are executed, but coverage report shows 0 coverage.

I'm getting the following message in log:

 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)

But the include pattern is [*]*.

I'm running TeamCity 6.5.3 if it matters. Has anybody managed to run partcover on that version?

Dave Schweisguth
  • 36,475
  • 10
  • 98
  • 121
Sly
  • 15,046
  • 12
  • 60
  • 89
  • I don't think JetBrains have upgraded TeamCity to use the latest version of PartCover (2.2 and 2.3 are the old version that were .NET2 only) rather than use the built-in integration try executing PartCover directly i.e. if using nant use the exec task. – Shaun Wilde Aug 10 '11 at 09:13
  • 1
    I know it's not exactly an answer to your question, but you might find that you can get sufficiently accurate coverage reports if you use Jetbrains DotCover instead of trying to integrate with PartCover. We are using it on our project and it was painless to setup. [Teamcity Dotcover](http://blogs.jetbrains.com/dotnet/2010/12/jetbrains-teamcity-6-is-released-bundles-dotcover/) – Nick Ryan Aug 10 '11 at 14:32

2 Answers2

7

1) PartCover only supports 32 bit processes, so you need to make sure your test runner is also running 32 bit.

2) Make sure you register the PartCover dll using regsvr32 (you can't use per-user registration if using a service account to run team city).

Shaun Wilde
  • 8,228
  • 4
  • 36
  • 56
1

In general this messages means TeamCity failed to find any covered line. This could be caused by assemblies or coverage parameters.

Please feel free to create an issue at http://youtrack.jetbrains.net with partcover report you got from a local test run. Please include version number of partcover too.

TeamCity 6.5.3 must support partcover 4.0.11129

Eugene Petrenko
  • 4,874
  • 27
  • 36
  • Why do you say they must support 4.0.11129 - do you have a link for this? AFAIK they only support 2.2 and 2.3 which was on Soureforge and they haven't done anything special for the .NET 4 version. So if they do support it, it is more by luck (due to GUIDs being maintained) than any actual planning. – Shaun Wilde Aug 14 '11 at 23:00
  • TeamCity only starts partcover.exe with given commandline. It parses generated report.xml file to create reports and publish statistics. What GUIDs do you mean? I checked that it is able to parse reports from 4.0.11129. – Eugene Petrenko Aug 17 '11 at 08:32
  • 1
    That is good news - the drop down entry in TeamCity says 2.2 and 2.3, but these are the .NET2 only versions. The latest version 4.0 - also handles .NET4 framework. Have you (JetBrains) considered supporting OpenCover - has 32/64 bit support and also has branch coverage as well as sequence point coverage. – Shaun Wilde Aug 17 '11 at 21:19