How do I enable PartCover code coverage with MSBuild task in TeamCity 5.0? Follow
I am confused as to the steps I need to take to enable PartCover code coverage reporting for MSBuild build configuration in TeamCity 5.0.1.
I read this: http://www.jetbrains.net/confluence/display/TCD5/.NET+Code+Coverage
Which led me to update my MSBuild file to this:
<Target Name="UnitTest">
<CreateItem Include="$(BinaryDirectory)/*.Test.dll">
<Output ItemName="UnitTestAssemblies" TaskParameter="Include" />
</CreateItem>
<Exec Command="$(teamcity_dotnet_nunitlauncher) v2.0 x86 NUnit-2.4.1 /partcover:"C:\Program Files\Gubka Bob\PartCover .NET 2.3\PartCover.exe" /partcover-arg:--output /partcover-arg:c:\Temp\result.xml @(UnitTestAssemblies)"
IgnoreExitCode="False"/>
</Target>
This works (with the exception that the script keeps going when tests fail). But there are no code coverage results. Then I found the configuration settings in the MSBuild section:
I could not find any help on this, and attempts to guess on how I should configure this failed.
Could you provide clear instructions on how I would enable PartCover code coverage for TeamCity 5.0?
Specifically,
- What I need installed on the Build Agents
- What changes I need to make to the MSBuild file, whether tests run in there need special handling to run PartCover
- What changes I need to make to the build configuration
Please sign in to leave a comment.
goto http://www.jetbrains.net/devnet/message/5254329#5254329