Exclusions

Exclusions

I'm having trouble with excluding attributes and files from NCover. Were currently getting results for the .cs files. These are not the tests that the files include these are the actual .cs files. ie. MyAppTests is showing it has a 100% pass rate but I don't want these included in the report. They all contain a TestFixtrueAttribute which I tried to use as an excludeAttribute but with no luck. I've also tried to exclude specific files from the NCoverExplorer task. I'm at my end with this and am unable find anything useful on the internet. We are running NCover from a Nant task. I'm hoping this is something little but any help would be appreciated.

There is an exclude in between the assemblies tags but not showing up for some reason....


RE: Exclusions

cchild,

it isn't as clear as it could be in the documentation, but NCover expects exclude attribute names to be fully qualified. So your excludeattribute should look something like "topnamespace.subnamespace.TestFixtureAttribute"

Also, the exclude files param matches against the fully qualified path of the file. The easiest way to get a match, if your file is named "myfile.cs" is to use regex to say you don't care about what preceeds the file name, like so: ".*myfile.cs$"

Stephen