Integrate NCover with TeamCity problem

Here are the script:
    <property name="nunitpath" value="build/NUnit/nunit-console.exe"/>
    <property name="nunitargs" value=""/>

             <ncover
                    program="build\NCover\NCover.Console.exe"
                    commandLineExe="${nunitpath}"
                    commandLineArgs="${nunitargs} ${TestProjectName}.dll"
                    workingDirectory="bin\nunit"
                    assemblyList="${AssembliesToProfiled}"
                    logFile="${outputPath}/coverage.log"
                    coverageFile="${outputPath}\${TestProjectName}.Coverage.xml"       
                  />  

the coverageFile is OK. but I can not get on-the-fly  test report..

If I change to

        <property name="nunitpath" value="${teamcity.dotnet.nunitlauncher}"/>
        <property name="nunitargs" value="v2.0 MSIL NUnit-2.4.8"/>


             <ncover
                    program="build\NCover\NCover.Console.exe"
                    commandLineExe="${nunitpath}"
                    commandLineArgs="${nunitargs} ${TestProjectName}.dll"
                    profiledProcessModule="JetBrains.TeamCity.PlatformProcessRunner.msil.exe"
                    workingDirectory="bin\nunit"
                    assemblyList="${AssembliesToProfiled}"
                    logFile="${outputPath}/coverage.log"
                    coverageFile="${outputPath}\${TestProjectName}.Coverage.xml"       
                  />  

I get on-the-fly test report. bu the coverageFile like this:

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="coverage.xsl" type="text/xsl"?>
<!-- saved from url=(0022)http://www.ncover.org/ -->
<coverage />


Here is the coverage.log:

EVENT:   Log link established.
EVENT:   Communications link established.
MESSAGE: Ready for command input.
EVENT:   Verbose Logging Disabled
EVENT:   Logging Enabled
EVENT:   AutoExclusion Enabled
MESSAGE: Monitoring Assemblies: aclaro.petroLook.Forecast.ObjectModel;aclaro.petroLook.Modules.Forecast.Core;
MESSAGE: Excluding Types and Methods with these Attributes: (No Exclusions Specified)
MESSAGE: Received driver ready event.
MESSAGE: v1.1.4322
EVENT:   Profiler Initialize
**ERROR(0x80131701)** Failed to get proc address for GetAssemblyIdentityInfoFromFile.
**ERROR(0x80131701)** Failed to get proc address for GetIdentityAuthority.
MESSAGE: Module Load ---- Thread: 0x00001098; Module ID: 0x79b7c000
**ERROR(0x80131351)** GetModuleInfo failed.
MESSAGE: Module [0x79b7c000] attached To assembly [0x0015f1b8]
MESSAGE: Assembly Load ---- Thread: 0x00001098; Assembly ID: 0x0015f1b8
EVENT:   Loaded Assembly [mscorlib][0x0015f1b8]
MESSAGE: Assembly Load Complete ---- Assembly ID: 0x0015f1b8
MESSAGE: Module Load ---- Thread: 0x00001098; Module ID: 0x00177680
**ERROR(0x80131351)** GetModuleInfo failed.
MESSAGE: Module [0x00177680] attached To assembly [0x0016b340]
MESSAGE: Assembly Load ---- Thread: 0x00001098; Assembly ID: 0x0016b340
EVENT:   Loaded Assembly [JetBrains.BuildServer.NUnitLauncher][0x0016b340]
MESSAGE: Assembly Load Complete ---- Assembly ID: 0x0016b340
MESSAGE: Module Load ---- Thread: 0x00001098; Module ID: 0x001994f8
**ERROR(0x80131351)** GetModuleInfo failed.
MESSAGE: Module [0x001994f8] attached To assembly [0x0016b5a8]
MESSAGE: Assembly Load ---- Thread: 0x00001098; Assembly ID: 0x0016b5a8
EVENT:   Loaded Assembly [JetBrains.Container][0x0016b5a8]
MESSAGE: Assembly Load Complete ---- Assembly ID: 0x0016b5a8
MESSAGE: Module Load ---- Thread: 0x00001098; Module ID: 0x0017d108
**ERROR(0x80131351)** GetModuleInfo failed.
MESSAGE: Module [0x0017d108] attached To assembly [0x0017cfe8]
MESSAGE: Assembly Load ---- Thread: 0x00001098; Assembly ID: 0x0017cfe8
EVENT:   Loaded Assembly [log4net.TC.Rebuilt][0x0017cfe8]
MESSAGE: Assembly Load Complete ---- Assembly ID: 0x0017cfe8
MESSAGE: Module Load ---- Thread: 0x00001098; Module ID: 0x7b2f80c0
**ERROR(0x80131351)** GetModuleInfo failed.
MESSAGE: Module [0x7b2f80c0] attached To assembly [0x001900c8]
MESSAGE: Assembly Load ---- Thread: 0x00001098; Assembly ID: 0x001900c8
EVENT:   Loaded Assembly [System][0x001900c8]
MESSAGE: Assembly Load Complete ---- Assembly ID: 0x001900c8
MESSAGE: Module Load ---- Thread: 0x00001098; Module ID: 0x7beb8000
**ERROR(0x80131351)** GetModuleInfo failed.
MESSAGE: Module [0x7beb8000] attached To assembly [0x001937c0]
MESSAGE: Assembly Load ---- Thread: 0x00001098; Assembly ID: 0x001937c0
EVENT:   Loaded Assembly [System.Xml][0x001937c0]
MESSAGE: Assembly Load Complete ---- Assembly ID: 0x001937c0
MESSAGE: Module Load ---- Thread: 0x00001098; Module ID: 0x001bb8a0
**ERROR(0x80131351)** GetModuleInfo failed.
MESSAGE: Module [0x001bb8a0] attached To assembly [0x001b03c0]
MESSAGE: Assembly Load ---- Thread: 0x00001098; Assembly ID: 0x001b03c0
EVENT:   Loaded Assembly [JetBrains.TeamCity.NUnitCommon][0x001b03c0]
MESSAGE: Assembly Load Complete ---- Assembly ID: 0x001b03c0
MESSAGE: Module Load ---- Thread: 0x00001098; Module ID: 0x001ba550
**ERROR(0x80131351)** GetModuleInfo failed.
MESSAGE: Module [0x001ba550] attached To assembly [0x001be3d0]
MESSAGE: Assembly Load ---- Thread: 0x00001098; Assembly ID: 0x001be3d0
EVENT:   Loaded Assembly [JetBrains.TeamCity.Utils][0x001be3d0]
MESSAGE: Assembly Load Complete ---- Assembly ID: 0x001be3d0
MESSAGE: Module Load ---- Thread: 0x00001098; Module ID: 0x001ca120
**ERROR(0x80131351)** GetModuleInfo failed.
MESSAGE: Module [0x001ca120] attached To assembly [0x001cc198]
MESSAGE: Assembly Load ---- Thread: 0x00001098; Assembly ID: 0x001cc198
EVENT:   Loaded Assembly [JetBrains.BuildServer.CommonLoggers][0x001cc198]
MESSAGE: Assembly Load Complete ---- Assembly ID: 0x001cc198
MESSAGE: Module Load ---- Thread: 0x00001098; Module ID: 0x001d0480
**ERROR(0x80131351)** GetModuleInfo failed.
MESSAGE: Module [0x001d0480] attached To assembly [0x001d0370]
MESSAGE: Assembly Load ---- Thread: 0x00001098; Assembly ID: 0x001d0370
EVENT:   Loaded Assembly [CookComputing.XmlRpc.TC.Rebuilt][0x001d0370]
MESSAGE: Assembly Load Complete ---- Assembly ID: 0x001d0370
MESSAGE: Module Load ---- Thread: 0x00001098; Module ID: 0x02fb0048
**ERROR(0x80131351)** GetModuleInfo failed.
MESSAGE: Module [0x02fb0048] attached To assembly [0x001d0ae0]
MESSAGE: Assembly Load ---- Thread: 0x00001098; Assembly ID: 0x001d0ae0
EVENT:   Loaded Assembly [XmlRpcProxy29296f62-69d2-4efd-8e1a-2d74c9674788][0x001d0ae0]
MESSAGE: Assembly Load Complete ---- Assembly ID: 0x001d0ae0
MESSAGE: Module Load ---- Thread: 0x00001098; Module ID: 0x001d4120
**ERROR(0x80131351)** GetModuleInfo failed.
MESSAGE: Module [0x001d4120] attached To assembly [0x001d0ae0]
MESSAGE: Module Load ---- Thread: 0x00001098; Module ID: 0x001f9630
**ERROR(0x80131351)** GetModuleInfo failed.
MESSAGE: Module [0x001f9630] attached To assembly [0x0022f550]
MESSAGE: Assembly Load ---- Thread: 0x00001098; Assembly ID: 0x0022f550
EVENT:   Loaded Assembly [inhdfqew][0x0022f550]
MESSAGE: Assembly Load Complete ---- Assembly ID: 0x0022f550


To conclusion, I can not get on-the-fly test report and correct coverageFile at the same time.

I am using NCover 1.5.5, Nunit 2.4.8 teamCity 4.5.


Any  idea?

1 comment
Comment actions Permalink

I get a work around to fix this problem.
I use Nunit 2.4.8

For teamcity.dotnet.nunitlauncher:
If I use NCover 1.5.5 beta  I can get on-the-fly test report but no code coverage.  If I use Ncover 1.5.5. I get Exception.

For Nunit-Console.exe:

If I have nunit.core.dll and nunit.framework.dll and nunit.core.interfaces.dll in the same folder. I get no on-the-fly test report. But If I delete the nunit.core.dll and nunit.core.interfaces.dll. I ge the

If I use NCover 1.5.8 beat . I get "No matching coverage files found in the <fileset> specified in your <ncoverexplorer> NAnt task.".

So the only working solution is NCover 1.5.5 + Nunit 2.4.8  using Nunit-Console.exe.  make sure no nunit.core.dll and nunit.core.interfaces.dll in the same folder.

0

Please sign in to leave a comment.