开发者

cobertura vs clover [closed]

Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 9 years ago.

Improve this question

We are thinking about utilizing one of these tools in our development 开发者_如何转开发procedure. Our environment extensively uses mvn and eclipse.

Which one in your opinion is the best utility for checking test coverage? I realize that it may depend on the situation to determine when it is better to use cobertura over clover and vice-versa.

Thanks in advance


I have also tried Clover, Cobertura and Emma. We are now using Cobertura. It took me about a day to integrate Cobertura into our headless build, it produces the statistics we require and the eCobertura eclipse plugin is primitive, but useable and informative. There is a very nice Hudson plugin for Cobertura also.

We where previously using Emma. Emma with the EclEmma plugin is about equivalent to Cobertura/eCobertura. Emma integration into Ant is a fracton more complex and doesn't offer a complexity factor. The EclEmma plugin is nicer and more mature then eCobertura. The Hudson plugin is equivalent and as easy to configure. Our reason for moving away from Emma was that the code base has not been maintained for some years now and we where having problems as it is rendered useless if encounters code using Lombok.

I spent a week (in parallel with other tasks) playing with Clover and coudln't get it working. I asked around my colleagues, some with a lot of experience, and only one had heard of somebody getting Clover working in the build, and that was difficult.

As Cobertura provides everything that we required, is easy to work with and is free we saw no reason to spend money on Clover.


One distinction of note is that Cobertura does NOT currently support Java 7:

Cobertura & Java 7 support

Clover 3.1.x DOES support Java 7:

http://confluence.atlassian.com/display/CLOVER/Clover+3.1+Release+Notes

UPDATE: Cobertura 2.0.3 supports Java 7


I was faced with a similar dilemma and tested Cobertura, Emma and Clover. Cobertura and Emma. Clover was probably the best out of the 3 tools in terms of the speed and the level of detail one could get into. We could afford to pay for a tool at the time so we decided to go with Clover. Of the two open source ones, I loved the simplicity of using Emma. Also, Emma provided us with Method level coverage, something that Cobertura did not.

At the end of the day. Code coverage metrics are just code coverage metrics, nothing fancy. Just use what you feel comfortable with. The pain point of using any of these tools is minimal.


I have not used Clover. I have used Cobertura: it was easy to setup and gave the simple C1 coverage results we wanted and expected. There was some issue that it always ran all the tests twice (once with and once without instrumentation), even though we didn't feel we needed that. However, since the test suite was short enough, it never bothered us.


We're using Cobertura currently, and I've been very impressed. It was amazingly easy to integrate into our existing build & unit test process (I think it look less than an hour to get fully running.) Also, our software stack is a mix of Java & Groovy, which Cobertura handles just fine, and even does coverage on closures the way you would want. (In my experience, very few Java tools actually work right with non-Java JVM languages, so that was a nice surprise.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜