Question

I'm currently trying to create a Nant task for our TeamCity setup so that our UnitTests are ran through Gallio and covered by PartCover. The task looks like this:

<!-- UnitTest Configuration -->
  <!-- ====================== -->
  <!-- This configuration runs the tests through Gallio with MbUnit together with
       PartCover to get the results of the test together with the coverage results 
  -->
  <target name="unitTest">      
        <echo message="Unittesting ${AssemblyToTest}"/>
        <exec program="${Paths.Tools}\PartCover\Partcover.exe" failonerror="true">
          <arg line="--target &quot;${Paths.Tools}\Gallio\Gallio.Echo.exe&quot;" />
          <arg line="--target-work-dir ${AssemblyToTestLocation}"/>
          <arg line="--target-args /r:Local &quot;${AssemblyToTest}&quot;" />
          <arg line="--include &quot;[${Tests.TestedAssemblyName}]*&quot;" />
          <arg line="--output ${Paths.Output}\Coverage.xml" />
        </exec>
  </target>

The tests are running, we can see this in TeamCity, and a Coverage.xml file is generated, but empty. There's only a single line in it.

Output of the variables:-

  • ${Paths.Tools} : C:\Robinson\Trunk\
  • ${Tests.TestedAssemblyName} : Name of the DLL
  • ${AssemblyToTestLocation} : Path to the DLL

Am I missing something?

EDIT The TeamCity application is running on a Windows Server 2003 R2 Server, and all the build-agents performing the work are currently running on Windows XP Systems, all 32bit installations.

Was it helpful?

Solution

I believe we covered this issue in https://github.com/sawilde/partcover.net4/issues/46

and the solution was along the lines of

--include [${Tests.TestedAssemblyName}*]* ?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top