科贝图拉 vs 三叶草

发布于 2024-10-15 14:34:46 字数 1433 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

翻身的咸鱼 2024-10-22 14:34:47

我没用过四叶草。我使用了 Cobertura:它很容易设置,并给出了我们想要和预期的简单 C1 覆盖结果。存在一些问题,即它总是将所有测试运行两次(一次使用仪器,一次不使用仪器),即使我们觉得不需要这样做。然而,由于测试套件足够短,所以它从来没有打扰我们。

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.

伤感在游骋 2024-10-22 14:34:47

我们目前正在使用 Cobertura,给我留下了深刻的印象。集成到我们现有的构建和构建中非常容易。单元测试过程(我认为完全运行看起来不到一个小时。)此外,我们的软件堆栈是 Java 和 Java 的混合体。 Groovy,Cobertura 处理得很好,甚至可以按照您想要的方式覆盖闭包。 (根据我的经验,很少有 Java 工具能够真正与非 Java JVM 语言一起工作,所以这是一个很好的惊喜。)

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.)

讽刺将军 2024-10-22 14:34:46

我还尝试过 Clover、Cobertura 和 Emma。我们现在使用Cobertura。我花了大约一天的时间将 Cobertura 集成到我们的无头构建中,它生成我们需要的统计数据,eCobertura Eclipse 插件很原始,但可用且信息丰富。 Cobertura 也有一个非常好的 Hudson 插件。

我们之前使用艾玛。带有 EclEmma 插件的 Emma 大约相当于 Cobertura/eCobertura。 Emma 集成到 Ant 中是一个更复杂的分形,并且不提供复杂性因子。 EclEmma 插件比 eCobertura 更好、更成熟。 Hudson 插件是等效的并且易于配置。我们离开 Emma 的原因是代码库已经有好几年没有维护了,而且我们遇到了问题,因为如果遇到使用 Lombok 的代码,它就会变得毫无用处。

我花了一周时间(与其他任务并行)玩 Clover,但无法让它工作。我询问了周围的同事,其中一些人经验丰富,只有一位听说过有人让 Clover 参与构建,这很困难。

由于 Cobertura 提供了我们所需的一切,易于使用且免费,因此我们认为没有理由在 Clover 上花钱。

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.

原野 2024-10-22 14:34:46

区别是 Cobertura 目前不支持 Java 7:

值得注意的一个 Java 7 支持

Clover 3.1.x 确实支持 Java 7:

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

更新:Cobertura 2.0.3 支持 Java 7

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

淡莣 2024-10-22 14:34:46

我也面临着类似的困境,并测试了 Cobertura、Emma 和 Clover。科贝尔图拉和艾玛。就速度和细节程度而言,Clover 可能是这 3 个工具中最好的。当时我们有能力购买工具,所以我们决定使用 Clover。在这两个开源软件中,我喜欢使用 Emma 的简单性。此外,Emma 为我们提供了方法级别的覆盖范围,而 Cobertura 则没有。

归根结底。代码覆盖率指标只是代码覆盖率指标,没什么花哨的。只需使用您觉得舒服的即可。使用这些工具的痛点都很小。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文