NCover //a - only works if .dll is not appended

NCover //a - only works if .dll is not appended

NCover 1.5.8, .NET 2 assembly

When I run NCover and specify the assembly as:

   NCover //a MyAssembly.dll

then no coverage info is generated. If I specify it as:

 NCover //a MyAssembly

then coverage information is generated.

I think this facility worked ok in earlier versions of NCover (1.5.4?), or perhaps I am specifying things incorrectly now?


Re: Using NCover with the //iis switch

In order for the output file to be written in //iis mode you need to stop the iis service (iisreset).  So after the unit tests complete, just issue that command and you'll have the results.

However I am also eager to find the switch (if one exists) to increase the timeout before NCover terminates while waiting for iis activity.  Anyone know if this can be done?


Re: Using NCover with the //iis switch

Thanks, that's helpful.  It's tricky do get this all working under NAnt, since NCover must be launched asynchronously.  I ended up doing it by having NAnt invoke a batch file that uses the "start" command to run NCover.

As far as timing is concerned, I found a trick that helps: call "iisreset /stop" right before launching "ncover //iis".  This reduces that amount of time it takes NCover to start, since at that point it only has to start IIS, not stop and then start.  But timing still remains tricky, because the unit test I run next might start before the detached NCover has gotten IIS runninf again.  Conversely, if there is too much of a delay before the unit test starts, NCover might time out.

So we really need a better usage model for doing this stuff under NAnt, or any other scripting environment.  A timeout switch would be a start in the right direction.


Re: Using NCover with the //iis switch

What do you think about a command to start NCover and a separate command (running a second instance of NCover.Console) that would collect the coverage data.


Re: Using NCover with the //iis switch

The timeout cannot be changed currently.  I've added it to my wishlist.


Re: Using NCover with the //iis switch

That sounds good, Peter, but would I still have to use my "start" kludge to get the initial instance started asynchronously?  It would be great if there was a switch that could be used in conjunction with //iis that would cause the NCover.Console process to do the equivalent of a fork.  But I like the idea in principle.