dotCover doesn't work with msbuild and nunit task

Hi,

If I understand correctly (http://confluence.jetbrains.net/display/TCD6/Configuring+.NET+Code+Coverage) dotCover should work just fine if I use msbuild nunit task to run my tests?
The tests gets run but I see no test coverage and no mention of dotCover in the log.

This is how I do it:


<Target Name="RunUnitTests">
    <ItemGroup>
      <TestAssemblies Include="$(ProjectTestDir)\*.UnitTests.dll" />
    </ItemGroup>
    <PropertyGroup>
      <TestResultFileName>UnitTestResults.xml</TestResultFileName>
    </PropertyGroup>
    <NUnit Condition="'@(TestAssemblies)'!=''"
           Assemblies="@(TestAssemblies)"  DisableShadowCopy="true" ToolPath="$(NUnitDir)"
           OutputXmlFile="$(ProjectTestDir)\$(TestResultFileName)" />
  </Target>


And this is howI the build is configured:

Config.png

1 comment
Comment actions Permalink

Hi Pawel

To get coverage and real-time test results TeamCity uses it's own version of NUnit task
You'll need to attach it using

<UsingTask TaskName="NUnit" AssemblyFile="$(teamcity_dotnet_nunitlauncher_msbuild_task)" />



See details at NUnit for MSBuild page.

Michael
0

Please sign in to leave a comment.