Inconsistent displayed coverage%

Inconsistent displayed coverage%

I have noticed cases where the tree view on the left might indicate I have 100% coverage for particular classes/methods, but when I select the classes, their method lists in the top pane will show one or more methods as having less coverage. When I view one of these methods, they (correctly) show sections that have, in fact, not been covered.

The lower coverage number is reflected in generated reports, as well.

It appears as if the error follows this pattern: If at least one method in the class has 100% coverage, all methods with nonzero coverage will display as 100% covered in the tree view.

Unfortunately, the discrepancy makes it difficult to scan through items in the tree view to look for items which are not fully covered.

I am currently using verion 2.0.4.0.


RE: Inconsistent displayed coverage%

As an addendum, the coverage% displayed for a given class in the tree view appears to be (# methods with any coverage) / (total methods), rather than (# sequence points in the class covered) / (total sequence points in the class)

As with method coverage, the correct class coverage appears to be displayed in the HTML reports.


RE: Inconsistent displayed coverage%

ATMAvatar,

It sounds like you're looking at Function Coverage Percentage. In NCoverExplorer, go to the "View" menu and select "Coverage", and make sure that "Sequence Points(%)" is selected to see sequence point coverage percentage.

Stephen


RE: Inconsistent displayed coverage%

Sure enough, that was it. Thank you.

Now I can put on my noob cap and sit in the corner :)


RE: Inconsistent displayed coverage%

I'm having a similar problem.

If I use NCoverExplorer via TestDriven.NET from within Visual Studio, it does show up the methods that are missing coverage.

However on our build server using NCoverExploer.Console, the report says that coverage is 100%, even though NCoverExplorer fails with Error Code 3 and writes to the console that coverage wasn't met.

What do I need to set in the NCoverExporer.Console configuration to get a similar report to what I see in the GUI version?

-dave


RE: Inconsistent displayed coverage%

minimally, you should use the /failminimum and /mincoverage:80 flags. what command line or build script are you using?