NCover with MSTest

NCover with MSTest

We're using MSTest in our continuous integration environment and would like to integrate NCover code coverage.  When running against mstest, NCover reports <seqpnt visitcount="0" ... for all entries.

The command line calling this is:

ncover.exe "mstest.exe /testmetadata:project.vsmdi /testlist:buildtests /resultsfile:out.xml"

This produces the default outputs Coverage.xml and Coverage.log.

Can anyone suggest what i might be doing wrong here.

Thanks


Re: Unable to locate fixture. HELP!!!

Hi mate,

Hmmm... that message is being thrown by NUnit-console when being run under NCover. I assume there must have been more output than just that you specified though? Can you post the full output from when the NCover task starts?

So the message means that as far as nunit is concerned it was not supplied with any dlls that had unit tests in them. Given the name "DatabaseScriptUtility.TestFixtures.dll" I'm guessing you did indeed specify the right dll... ;-). You dont have any conditional compile resulting in the tests not being in the dll or anything silly like that?

Don't worry about the registration stuff - by default the <ncover> task will do its own registration while the task runs. You would have got different error messages as you found on my blog posts if that was the problem.

Your ncover NAnt task looks ok from what I see - if you add the verbose="true" argument to it and run it again and post the output perhaps I can offer another suggestion.



RE: NCover with MSTest

I'm also getting the same error on my CC.net setup. all my methods show 0 visits.


I've been searching the net all morning for an answer and cannot find one.

Tried all sorts of things without any result but 0 visits.

Help!


RE: NCover with MSTest

which version of NCover are you running?


RE: NCover with MSTest

Hi there,

Was this problem ever rectified? I am having exactly the same problem.

Many thanks

Matt


RE: NCover with MSTest

You have to use the cover child process option

Process Module When set, instead of covering the process that is passed on the command line, NCover will cover all (child) processes whose name is an exact (case-insensitive) match of the given process name.

Example: Format: CoverChildProcess="vstesthost.exe"


RE: NCover with MSTest

Your help is much obliged. Keep up the good work. Thanks