Issues with getting PartCover to run

I am no doubt doing something braindead stupid but I cannot for the life of me get PartCover to work in TeamCity. I have installed PartCover on the build agent. I'm using msBuild and have configured my build configuration as follows:

partcover.jpg

When I run run my project (using the agent where PartCover is installed) everything indicates success but no "Coverage" tab ever appears. Furthermore, if I completely mess up the path to PartCover, everything still stays green. The logs show no indication that PartCover is ever being called. It really appears like despite the configuration of PartCover it's never being invoked.

What am I doing wrong?

Thanks!
-kevin

8 comments

How? Do you use <NUnitTeamCity> or TeamCity NUnit Launcher exe?

0

I think I'm answering your question correctly: we're using the native nUnit rather than TeamCity's launcher.

0

Ok. Sorry, it was not obvious for me, because there are many NUnit version bundled inside TeamCity.
Implicit .NET code coverage will work only if you use TeamCity proveded NUnit tasks.

Please have a look at
http://confluence.jetbrains.net/display/TCD5/Manually+Configuring+Reporting+Coverage
for details on how to publish a coverage report into TeamCity to make TeamCity create an html report and statistics record.

Starting from next TeamCity 6.0 EAP we introduced a standalong NUnit build runner where it is possible to switch .NET coverage on.
http://blogs.jetbrains.com/teamcity/2010/09/28/separate-runners-for-net-test-frameworks/

0

Thanks for the guidance. One question, though. Taking this approach, you need to indicate the location of the coverage .xml files. What actually generates these though and where are they stored? I've been looking in the artifacts directory and don't see any coverage files generated. You're not referring to the nUnit test results xml are you?

0

You have two ways to make coverage working with NUnit under TeamCity.
The first way is to use TeamCity provided NUnit support. This way will make coverage collecting implicit. It means, TeamCity will start coverage tool and gather generated report from coverage tool. In the previous reply, report files were referred to coverage tool report files.

If you do not use bundled NUnit support in TeamCity, you will need to gather coverage information manually by explicit starting coverage tool that would start nunit-console.exe. As the result the coverage tool produces a report file. You may report this result to TeamCity to make TeamCity generate HTML report from all submitter reports.

In the previous post I added links to documentation describing the second approach.

0

Thanks, that helps clear up the confusion!

0

Please sign in to leave a comment.