NCover 1.5.4 Observations
NCover 1.5.4 Observations
Hi Peter, sorry somehow I managed to post this in the old community forums so please ignore/delete that and will put it in here for more visibility!
(1)
Sometimes the "assembly" node is written to the coverage file with a
blank value. This occurs when the module is duplicated in the coverage
file - which happens sometimes when being run from TestDriven.Net at
least. If you haven't seen this before let us know and we can send you
a repro.
(2) If I create a [CoverageExclude] attribute, it
appears that NCover ignores it when it is applied to my
CoverageExcludeAttribute class itself. So the attribute itself always
shows up as unvisited code. [I have since seen there was another posting about code not being excluded if not hit by tests and I assume this is the same thing and will be fixed in your next version]
(3) Code which has had a
[CoverageExclude] attribute applied always has a visitcount of zero,
even though it may have been invoked. I was thinking of an "undo
exclude" option for NCoverExplorer when browsing the results, however
it does mean any NCover excluded code will show up as unvisited which
isn't necessarily correct. Of course I understand you would normally
only put the attribute on unreachable code but wasn't sure how
intentional this was on your part?
(4) What is with those
bizarre <seqpnt> line numbers that we all see randomly injected
in the coverage.xml files from time to time (16707566)? This is in all versions of NCover, nothing new. I see you are still not excluding these in your
default stylesheet, which gives incorrect coverage totals when they
occur. I deliberately exclude these nodes in NCoverExplorer but have
had a few people ask me what they were.
Best regards,
Grant.
<br />
Re: NCover //a - only works if .dll is not appended
//a requires the Assembly Name. The assembly name does not include the file extension. This is the way this feature has worked for a while.
Re: NCover or NUnit hangs...
Which version of NCover are you using? There is a known bug in NCover 1.5.4 with the //q argument which causes that behaviour (don't use it!).
How are you executing NCover - command line, TD.Net etc? When you say "sometimes" what variables are introduced - are you always running the same tests with the same command line etc. Is the code under test doing anything "funky" - making remoting calls, web services, playing with IPrincipal etc...
Re: NCover or NUnit hangs...
Solved! I had forgotten to register CoverLib.dll like this:
regsvr32 c:\Program Files\NCover\CoverLib.dll
Cheers,
-pom-