Nant NCover excludeAttributes problem
Nant NCover excludeAttributes problem
I have a NCover task in my Nant build file, and I want exclude some classes and methods from coverage using excludeAttributes. It works ok for classes, but not methods.
This is my Nant:
Any ideas what I could try?
Catherine
RE: Nant NCover excludeAttributes problem
Ok, pasting xml into this page doesn't work very well.
The attribute looks like this
excludeAttributes="Ttl.Swerl.Utils.CoverageExcludeAttribute"
and the rest of the Nant is ok, I'm sure.
Catherine
RE: Nant NCover excludeAttributes problem
Hi Catherine,
There is a known bug which will be fixed in the next release very shortly of NCover 2.0.3. If your NAnt task is working correctly, then looking at the coverage.xml file for that method you should see excluded="true" on the node. If you don't have that, then there must be something wrong with the namespace specification supplied to the NAnt task.
Once you do have that, then unfortunately the bug is that not all of the sequence points within that method are marked as excluded=true which they should be. That is what causes it to look like an unvisited method in NCoverExplorer rather than being correctly shown as "Excluded".
Keep an eye on the NCover blog/forum for announcements of NCover 2.0.3 and hopefully this should resolve your issue.
Grant.