Sean G

Sean G

  • NA
  • 15
  • 0

NCover command line parms

Aug 8 2007 7:40 AM
hi there,

im currently building a continuous integration nant script and im trying to incorporate NCover documentation into the build process.

when i run the command below, i get file cant be found errors, but all dirs do exist! is there anything im doing wrong?

thanks


-----------------------------

runNCover:

     [echo] Starting NUnit code coverage run...
    [mkdir] Creating directory 'C:\WorkingFolder\BuildingSolution\bin\Latest\cov
erage_results'.
     [exec] NCover.Console v1.5.4 - Code Coverage Analysis for .NET - http://nco
ver.org
     [exec] Copyright (c) 2004-2005 Peter Waldschmidt
     [exec] Command: /c
     [exec] Command Args: C:\WorkingFolder\devtools\nunit\bin\nunit-console.exe
C:\WorkingFolder\BuildingSolution\bin\Latest\BuildingBL.dll
/xml:C:\WorkingFolder\BuildingSolution\bin\Latest\BuildingTest.dll-results.xml
/w C:\WorkingFolder\devtools\nunit\bin
/o C:\WorkingFolder\BuildingSolution\bin\Latest\coverage_results\Coverage.xml
/l C:\WorkingFolder\BuildingSolution\bin\Latest\coverage_results\Coverage.log

     [exec] Working Directory:
     [exec] Assemblies:
     [exec] Coverage Xml: Coverage.Xml
     [exec] Coverage Log: Coverage.Log
     [exec] The system cannot find the file specified

BUILD FAILED

C:\WorkingFolder\BuildingSolution\BuildingSolution.build(69,5):
External Program Failed: C:\WorkingFolder\devtools\NCover\NCover.Console.exe (re
turn code was 1)



nant script:
   <!-- runNCover will run coverage on the nunit scripts -->
    <target name="runNCover" description="Runs Coverage">
      <echo message="Starting NUnit code coverage run..."/>
     
      <mkdir dir="${Build.OutputFolder}${sys.version}\coverage_results" failonerror="false"/>
      <!-- path to coverage app and working directory -->
      <exec program="${DevTools.Location}NCover\NCover.Console.exe" workingdir="${DevTools.Location}NCover" >
     
        <!-- /c parameter is the application to run and profile: this case nunit and its project file -->
            <arg value="/c ${DevTools.Location}nunit\bin\nunit-console.exe &quot;${Build.OutputFolder}${sys.version}\BuildingBL.dll /xml:${Build.OutputFolder}${sys.version}\BuildingTest.dll-results.xml&quot;" />
      
        <!-- /w parameter is the working directory for nunit -->
            <arg value="/w &quot;${DevTools.Location}nunit\bin&quot;"/>
       
        <!-- /o paramter is where to write the coverage results -->
            <arg value="/o &quot;${Build.OutputFolder}${sys.version}\coverage_results\Coverage.xml&quot;" />
           
        <!-- /l parameter is where to write coverage log file -->
            <arg value="/l &quot;${Build.OutputFolder}${sys.version}\coverage_results\Coverage.log&quot;" />
           
        <!-- /a parameter - VERY IMPORTANT: list of assemblies to do coverage for, if not specified it will run coverage on all assemblies loaded by nunit -->
            <!-- <arg value="/a &quot;Assembly1;Assembly2;Assembly3;Assembly4&quot;" /> -->
      </exec>    
    </target>