Not getting coverage data

Not getting coverage data

Hi, I'm evaluating NCover against some other coverage tools (we currently use DevPartner). I like the feature set, but it doesn't seem to be working on our test project. The command line args I use against a small prototype works fine, but when I try it against our real project the resulting coverage file is essentially empty. Any idea why this would happen?

Command Line:

ncover.console //h report ....\ExternalDependencies\3rdParty\NUnit\Current\bin\nunit-console.exe /labels .\CoreTest\bin\Release\Intuit.Spc.Esd.Core.Test.dll /xmlCoreTestResults.xml //xml CoreTestCoverage.xml

Result:

<?xml version="1.0" encoding="utf-8" ?> - <!-- saved from url=(0022)http://www.ncover.org/ --> - <coverage profilerVersion="2.0.1" driverVersion="2.0.1.0" startTime="2007-09-27T16:13:43.3208475Z" measureTime="2007-09-27T16:17:29.9487483Z" projectName="Your Project"> - <documents> <doc id="0" excluded="false" url="None" /> </documents> </coverage>

thanks, Orlando


Re: Not getting coverage data

Orlando,

Most likely this is because NCover is not able to find your debugging symbols. Are there pdb files in the directory with your test dll?

Another good way to figure out if it is finding debugging symbols is to use the //l flag, and specify a log file to write to. The log file will note that symbols were not found if they aren't available.

Let me know if that helps, Alan Johnson


Re: Not getting coverage data

Thanks! The log file pointed the way to the problem. The PDB was present in the source directory, but it turns out NUnit was Shadow Copying just the assemblies somewhere else. Using the /noshadow option with NUnit fixed this.


Re: Not getting coverage data

I had this problem too and checking the Coverage.log file was helpful in identifying the issue.

I also ran into an issue where if there are multiple assembly names specified with the //a option, the semicolon-delimited list cannot contain any spaces. For example,

[color=#0000BF:29cdb]NCover.Console MyApp.exe //a "MyFirstAssembly;MySecondAssembly"[/color:29cdb]

will work but

[color=#0000BF:29cdb]NCover.Console MyApp.exe //a "MyFirstAssembly; MySecondAssembly"[/color:29cdb]

will [i:29cdb]not [/i:29cdb] work (note the space after the semicolon). Lost a few hours figuring out this one ;-) as it seems to have been changed from the pre-v2.0 versions.


Re: Not getting coverage data

[quote="ewong":f8422]I also ran into an issue where if there are multiple assembly names specified with the //a option, the semicolon-delimited list cannot contain any spaces. [/quote:f8422]

I've recorded this issue in our bug database. We'll investigate the issue.

Thanks, Peter


Re: Not getting coverage data

I have pdb info in my dll but get no coverage. I am using NCover + NUnit on other Dlls and it works fine. I have looked in the coverage.log and it seems OK, it says symbols are loaded: Loaded symbols for module [C:\TH\Ultra2\bin\Release\TH.Analysis.CASC.Tests.dll] in [C:\TH\Ultra2\bin\Release].

NUnit - I've used \noshadowcopy

Any other ideas? Nigel


Re: Not getting coverage data

Are you using the version of the pdb's that was built with the executable? Are you inadvertently excluding the module in the //ea option? Could you attach your log file to your reply?

Thanks, Stephen Ward


Not getting coverage data

I'm using NCover and has same trouble of No results. If i run NCover for few mins as a test run it is giving me the results correctly but when i run it for the whole day on my staging servers it is not giving out results.

       **Do we have any limits on the time interval that NCover can work. **

Checked with Logs as well but no use it desn't give me any clue.


Re: srinivasbommareddy

If you could, post this as a new topic, so that it will be a little more visible to the community. Also, we got your support ticket, and should have an email back to you in the next 24 to 48 hours.