Exclusion of properties

Exclusion of properties

I'm running NCover using the latest version of the TestDriven.Net addin (2.3-beta with 1.5.7)
 - btw how can the version be larger than the current 1.5.5?

Exclusion works fine on classes and methods, but only partly on properties

This doesn't work:

[CoverageExclude]
public bool ExclusionWorks {
  get { return false; }
}

however, this does:

public bool ExclusionWorks {
  [CoverageExclude]

  get { return true; }
}

On a side note, I also tried to apply it to my entire test assembly using
[assembly: CoverageExclude]
which didn't work :(


Re: Coverage reports differ when using one assembly verses multi

It's a known issue, the problem lies with NCover 1.5.5/1.5.6. There's plenty of warnings spread around on the forums about it - its to do with NCover, AppDomains and sequence points. Basically the way NCover is in it's latest released versions makes it very difficult to merge correctly as there are differing numbers of sequence points for the same method in different files, depending on how the AppDomain was loaded etc.

The latest version of TD.Net and NCoverExplorer do handle this a bit better but the official NCover 1.5.7 release is the best long term solution. What version of all the tools do you have installed? Last I heard from Peter a few weeks ago he was hoping to release 1.5.7 fairly shortly but between his lack of time and various technical issues that have cropped up this release has been a long while coming so thats as much as I can tell you.

Just to add some slight confusion - depending on your TD.Net version you may see an NCover 1.5.6 or 1.5.7 folder and wonder why they are not on this site. 1.5.6 was a temporary release that addressed just the issue of 1.5.5 of not being able to profile .NET 1.1 assemblies. The 1.5.7 Jamie bundles was an early alpha build of my attempt at resolving some of the 1.5.5/1.5.6 bugs which do have some showstoppers. Peter has done some major restructuring since then with what will become the official 1.5.7 build - I'm sure Jamie will update TD.Net to as soon as it is available to us.

Hope that helps - its a bit of a mess at the moment but from all the discussions with Peter and things I have seen in the next 1.5.7 build it's going to hopefully be well worth the wait.


Re: Coverage reports differ when using one assembly verses multi

Thanks Grant,

I did try to see if it was a known issue (checked FAQ, searched forum, etc) but I guess I wasn't searching hard enough.  Yes we are using latest publically released versions of NCover/Explorer and TestDriven.NET.

We're happy to wait for 1.5.7, and since testing single assemblies works ok it's a workaround we can live with until the next version.

p.s. Good luck against the poms in the one-day match today, bad luck you lost to us on Tuesday ;-)


Re: Coverage reports differ when using one assembly verses multi

Regarding the p.s. - in the race for the title of worst one day side you just pipped us... ;-)  Although I fully expect the kiwis to put in another strong performance for a bottom of the table position in their next game...