How to check code coverage using tests for methods with a specified level of complexity in Java

I want to be able to test coverage by testing those of my methods that have complexity above a certain level.
Are there any plugins for this for Eclipse, Sonar, Hudson?

Thanks!

+8
java unit-testing code-coverage
source share
5 answers

I found a simpler solution. I can use the filter in SONAR http://docs.codehaus.org/display/SONAR/Filters , where you can use this metric.

+3
source share

For good code coverage, you should check out this tool. It is available for Eclipse.

Emma Code Coverage

+2
source share

http://eclipse-metrics.sourceforge.net/

Eclipse Metrics Plugin for Measuring Difficulty

+1
source share

As already mentioned, Cobertura is a tool for measuring code coverage. It also measures complexity (see Report). Thus, you can try converting the xml output so that it only displays the coverage of methods that exceed a given complexity threshold.

+1
source share

Emma code coverage can also be used with ant to automate code coverage.

0
source share

All Articles