VS2008 / NCover MSTest.exe integration

VS2008 / NCover MSTest.exe integration

When I attempt to use VS2008 Professional and the built-in Unit Tests (via MSTest.exe), all of my code coverage metrics show 0%. I suspect that it happens due to the NCover instrumentation not being applied in the correct directory under which the MSTest.exe is being run.

Can anyone shed some light on how this integration might work with NCover.Console.exe?

Thank you in advance.


RE: VS2008 / NCover MSTest.exe integration

simkin,

I've taken the liberty of elevating this to a support ticket. One of the support team shoudl contact you soon.

Stephen Ward


Resolution!

I read a few articles scattered across the Internet that suggested that the //pm parameter was the correct solution for this problem. Peter from Gnoso Support contacted me back and gave me the following resolution for my problem...

[snip] Try running mstest with the /noisolation parameter and removing the //pm parameter.

For a little more background... It turns out that MSTest starts multiple child processes with the same name (VSTestHost.exe) while running its tests in the default configuration. This confuses the profiler because two copies of the profiler end up being launched. Two copies of the profiler connected to a single controller instance is not a workable configuration.

It turns out that by running MSTest with the /noisolation option, VSTesthost.exe is not used and we can avoid the problem. [/snip]

Awesome job and kudos to Peter for giving me the resolution!