9

I want to be able to check test coverage of those of my methods that have complexity above some given level.
Are there any plugins for Eclipse, Sonar, Hudson for that?

Thanks!

1
  • 1
    That's a nice question. But all the answers so far don't seem to the output of code coverage and complexity measuring together. Nov 15, 2012 at 14:39

5 Answers 5

3

I've found simpler solution. I can use a filter in SONAR http://docs.codehaus.org/display/SONAR/Filters where given metric can be used.

1
  • By parsing the whole internet for cool development things I've found your question and accepted answer. Sonar has changed a lot meanwhile, so I did not found the correct menu entry to do the same on my sonar system. Could you please post some examples? Did you exclude a whole file or just some methods? Jul 17, 2017 at 14:14
2

For good code coverage you should check out this tool. It's availiable for Eclipse.

Emma Code Coverage

1

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

The Eclipse Metrics plugin to measure complexity

1

As already mentioned Cobertura is a tool for measuring code coverage. It also measures complexity (see the example report). So you could try to transform the xml output of it that it only shows coverage of methods that exceed a given complexity threshold.

0

Emma code coverage can also be used via ant for code coverage automation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.