NCover and TypeMock
NCover and TypeMock
I'm trying to use NCover together with NUnit and TypeMock. When I run simple NAnt script that starts typemock and runs ncover , the tests (including those dependent on TypeMock) are executed successfully , but then I get
[ncover] Exception [ncover] [ncover] -- Top-level exception (System.Exception) [ncover] No data was collected. [ncover] -- Stack Trace [ncover] at NCover.Framework.ProfilerDriver._GetCoverageData() [ncover] at NCover.Framework.ProfilerDriver.Execute() [ncover] at NCover.ConsoleMain.ConsoleMain.Main(String[] args) [ncover]
BUILD FAILED
c:\TeamCityTools\nant-0.86-beta1\bin\test1.build(43,6): External Program Failed: C:\Program Files\NCover\NCover.Console.exe (return code was 20000)
NAnt script:
<?xml version="1.0"?>
RE: NCover and TypeMock
what is the script you use for running NCover (arguments and commands)
RE: NCover and TypeMock
XML was corrupted by forume engine. Sorry.Escaped < and > chars:
<?xml version="1.0"?> <project name="prj" default="test"> <property name="nunit" value="c:\Program Files\NUnit 2.4.7\bin\nunit-console.exe" /> <property name="ncover.dir" value="C:\Program Files\NCover\" /> <property name="typemock.dir" value="c:\Program Files\Typemock\Isolator\5.2" />
<target name="test"> <loadtasks assembly="${typemock.dir}\TypeMock.NAntBuild.dll" /> <loadtasks assembly="${ncover.dir}\Build Task Plugins\NCoverExplorer.NAntTasks.dll" /> <typemockstart target="2.0" link="NCover2.0" profilerlaunchedfirst="true" /> <ncover program="${ncover.dir}\NCover.Console.exe" commandLineExe="${nunit}" commandLineArgs="My.tests.dll" registerProfiler="false"/> <typemockstop /> </target> </project >
RE: NCover and TypeMock
your script looks ok, there might be something wrong w/ the NCover config.
Do your tests run (but fail) when you use just NCover w/o typemock?
RE: NCover and TypeMock
Yes without typemock ncover does not fail, but typemck dependent tests fail
RE: NCover and TypeMock
You should contact the Typemock people about this issue.
All of the NCover settings are correct.
Hope this helps.
Joe