Welcome, Guest!

NCover with MSTest

NCover with MSTest

by forums on Tuesday September 18, 2007, 01:34 PM

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!!!

by forums on Tuesday September 18, 2007, 01:35 PM

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

by LeeRoystonHayes on Monday August 11, 2008, 06:18 AM

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

<ncover>
program="${NCoverDir}\NCover.Console.exe"
commandLineExe="${MSTestDir}\MSTest.exe"
commandLineArgs="/testcontainer:${directory::get-current-directory()}\build\Lees.Tests.dll"
coverageFile="${directory::get-current-directory()}\build\Coverage.xml">
<assemblies>
</assemblies>
</ncover>

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

by sporewell on Tuesday August 12, 2008, 06:05 AM

which version of NCover are you running?