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

后端 未结 5 1584
臣服心动
臣服心动 2021-01-17 19:59

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?

5条回答
  •  暖寄归人
    2021-01-17 20:25

    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.

提交回复
热议问题