# Wednesday, April 07, 2004

I'm really wanting to fold some kind of code coverage tool into my automated build process.  I'm using CruiseControl.NET to do continuous integration builds, which run NUnit tests, FxCop, build docs, etc, all through the wonders of NAnt.  The problem comes when trying to decide which code coverage tool to run.  For more info, see a presentation I did for a user group meeting a while back.

There seem to be two different projects, both called NCover that provide code coverage for .NET projects.  One of them is at GotDotNet, and it uses the profiling API to get coverage data from a running assembly.  Pretty cool, but I haven't been able to get it to work reliably with NUnit tests.  I think that NUnit doesn't allow enough idle time for the NCover output to get flushed to disk before the process goes away.  Drag.  However, I see that a new version was release yesterday, so I'll have to try it out and see how that goes.

The other NCover follows a more traditional source code intrumentation approach.  You build your project with it, which injects coverage hooks into your source, then you run your tests and out come coverage reports.  Cool.  And somehow it just feels more reliable to me than depending on the (slightly witchy) profiler interface.  On the other hand, it requires a lot more setup and is much more intrusive.  But it seems to work. 

Does anyone have any experience with one or the other?  Or any opinions?

Builds | Work
Wednesday, April 07, 2004 7:06:43 PM (Pacific Daylight Time, UTC-07:00)
NCover (GDN) is awsome and no intrusion. So try using it with nunit-console. The GUI for Nunit is a little flaky when it comes to all things not NUnit. Especially when it comes to things like this. We use the console as part of the continuous build.
Friday, May 07, 2004 11:42:31 AM (Pacific Daylight Time, UTC-07:00)
We also have integrated nCover (GDN) into our CruiseControl.net site and have had great success with it. We are using the nunit-console for the unit tests.
In addition Peter (the original writer of nCover) has been very responsive with integrating changes/fixes when we submit them.
Jeff Hemry
Friday, June 18, 2004 10:23:42 AM (Pacific Daylight Time, UTC-07:00)
What does your nant tasks look like for CC.Net?
Sunday, June 27, 2004 12:15:43 PM (Pacific Daylight Time, UTC-07:00)
we are in the process of integrating support for both versions of NCover into CCNet. it should be included in the next CCNet release.
exortech
Tuesday, January 04, 2005 8:39:51 AM (Pacific Standard Time, UTC-08:00)
perhaps changing the timeout in ccnet.config might solve your problem

<build type="nant">
<buildTimeoutSeconds>10800</buildTimeoutSeconds>
</build>
Comments are closed.