[68cat][editor] Code coverage module

View: New views
1 Messages — Rating Filter:   Alert me  

[68cat][editor] Code coverage module

by choc_dan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've used the code coverage module for a little while now.  As a result I have filed the following issues (mainly enhancement requests).  Feel free to comment...

Daniel Sheppard

http://www.netbeans.org/issues/show_bug.cgi?id=175721
The code coverage report is only meaningful if the weaknesses in the coverage can be extracted.  This isn't easy with the current code coverage report however because the table only sorts its columns alphabetically.  What is required is to be able to sort table rows by measures of significance, such as percentage (treated as a number so that 10% and 100% are correctly ordered) and number of lines *not* covered.

It is interesting that whilst the report details the number of lines covered, it is actually the number of lines not covered that is actually the more interesting measure because that indicates what is left to do!

I suggest columns for %age coverage, lines not covered and total number of lines, each of which should be ordered numerically.  The report should order using on of these measures by default.  My preference would be to use the number of lines not covered.

http://www.netbeans.org/issues/show_bug.cgi?id=175723
After the unit tests have been run I keep having to request a new code coverage report.  It would be preferable if this updated at the end of the run automatically and included columns showing how the coverage changed from the last run, coloured green for improvement and red for regression.  The report can include a button to take the user back to the file that they were previously editing.

http://www.netbeans.org/issues/show_bug.cgi?id=175724
The visibility of code coverage highlighting can only be removed by deactivating code coverage.  At times though all I want is to hide it from the editor and the left-hand line number bar, but for coverage to still be active so that the report gets updated the next time I run the tests.  It would be more convenient if there was a button in the toolbar of the editor that would appear when code coverage was active that would toggle the showing of code coverage for that file.

http://www.netbeans.org/issues/show_bug.cgi?id=175720
I have the code coverage module active and a file open showing lots of covered lines.  If I place the cursor on one such line (quite likely when coverage is good) then the highlighting for the current line doesn't show because it is masked by the code coverage highlighting.  Given that the bean symbol still appears in the left margin it would be nice if the current line highlighting appeared on top.

http://www.netbeans.org/issues/show_bug.cgi?id=175722
Classes that are of greatest need to high/complete code coverage are those that are the most complex.  The total number of lines is a simple indication of complexity, but there are much better measures out there including cyclometric complexity.  I seem to remember a module in the past that could give this very value.  It would be useful if this measure could be incorporated into the code coverage report to make is easier to identify those classes that require the greatest attention.