1

I am using NAnt to run my builds with TeamCity. The build is running without any problem. It also displays me that all tests had passed. NCover created the coverage xml file. There are a lot of information about the components mspec is using to run the tests in it but there is nothing about my code. When generating the Html-Report my module is missing completely. For me this is really strange. Is there someone who is able to help me?

The NAnt-target:

<target name="teamcity">                    
    <ncover program="c:\Program Files\NCover\ncover.Console.exe"
            testRunnerExe="src\Solutions\packages\Machine.Specifications.0.4.9.0\tools\mspec-clr4.exe"
            testRunnerArgs="src\Mock2Dgs.Tests\bin\Debug\Mock2Dgs.Tests.dll --teamcity" />          
    <mkdir dir="Artifacts/coverage" />
    <exec program="c:\Program Files\NCover\NCoverExplorer.Console.exe" output="ncoverexplorer.log" workingdir="Artifacts/coverage">
        <arg value="..\..\Coverage.xml" />
        <arg value="/h:coverage" />
        <arg value="/r:FullCoverageReport" />
        <arg value="/p:${Project.Name}" />
        <!--<arg value="/eas:${coverage.ExcludeAssemblies}" />-->
    </exec>
</target>
Anthony Mastrean
  • 21,850
  • 21
  • 110
  • 188

2 Answers2

0

The most likely reason for this kind of behavior is that you don't have up to date debug symbols available? Are you compiling with debug symbols?

  • Yes I do. The assemblies were rebuild with debug symbols before every test run. I have compared the timestamps so that should not be the problem. – Sebastian Brandt Apr 08 '11 at 21:11
  • Are the dlls and pdbs from a different machine and if so, is the os the exact same? – joe.feser Apr 09 '11 at 20:41
  • No they were compiled by teamcity in the same build step just seconds before ncover is starting. src\Mock2Dgs.Tests\bin\Debug\Mock2Dgs.Tests.dll there is definitivle the dll and the pdb. And they are both from the same version. Is it possible that ncover has problems with clr4 ? – Sebastian Brandt Apr 11 '11 at 12:56
0

What version of NCover are you using? From your commands, it looks like maybe an earlier version (possibly 1.5.8).

IronQuill
  • 66
  • 2