Eclipse插件,覆盖代码 [英] Eclipse plugin for code coverage
问题描述
我在代码覆盖插件中搜索Eclipse。
我的问题很简单:
I search a code coverage plugin for eclipse. My question is simple:
您将哪个插件与eclipse一起使用以覆盖代码,为什么?
Which plugin do you use with eclipse for code coverage and why ?
推荐答案
编辑(2015)-我当前的建议: EclEmma / JaCoCo 。
Edit (2015) - My current recommendation: EclEmma / JaCoCo.
不知道为什么在2012年1月我没有看到这个,因为显然有活跃的开发,甚至在那时就一直在不断复制新版本。
Not sure why I didn't see this back in January 2012, as there was clearly active development with new versions consistently being reproduced even back then.
从那以后,对于Cobertura / eCobertura感到有点沮丧,因为此后的发展似乎停滞了,对当前Java版本的支持开始有所欠缺。
I've since become a bit frustrated with Cobertura / eCobertura, as development since seems to have stalled, with support for current Java versions starting to be somewhat lacking.
JaCoCo可能已经取得了进步自从我上一次在2012年查看此内容(或者我完全错过了它,或者查看了EMMA vs. JaCoCo)以来-但是当前版本提供了Eclipse内置的出色支持(由EclEmma提供)以及许多其他功能。 er IDE,支持Apache Maven,Apache Ant,命令行,Java API和许多其他第三方集成。请参考完整列表,网址为 http://www.eclemma.org/jacoco /trunk/doc/integrations.html 。
JaCoCo may have advanced since I last looked at this in 2012 (or I simply missed it entirely, or was looking at EMMA vs. JaCoCo) - but the current version provides excellent support built-in to Eclipse (provided by EclEmma) as well as many other IDEs, support for Apache Maven, Apache Ant, command-line, Java API, and many other third-party integrations. Please refer to the complete list at http://www.eclemma.org/jacoco/trunk/doc/integrations.html .
我现在将我的一些项目从Cobertura切换到JaCoCo,并且对整合和结果-在Maven报告和Eclipse中均如此。不确定是否有竞争解决方案,但是JaCoCo甚至可以配置为如果不满足某些代码覆盖率阈值,则构建失败。
I am now switching some of my projects over to JaCoCo from Cobertura, and am very impressed by the integration and results - both in Maven reports as well as Eclipse. Not sure about competing solutions, but JaCoCo can even be configured to fail a build if certain thresholds of code coverage are not met.
JaCoCo专门记录为支持Java类文件从1.0版一直到1.8 * 。
JaCoCo is specifically documented to support Java class files from version 1.0 all the way through 1.8*.
我找到了他们的任务声明非常值得尊重。
I find their Mission Statement very respect-worthy.
参考文献/资源:
尤其是不幸的是,这个问题已经关闭,这是我在做出决定时使用的各种参考文献和资源的迷你目录,并且我鼓励这里的每个人都参考以便做出自己的决定。
Especially as this question has unfortunately been closed, here is a mini-directory of some of the various references and resources that I used in making my decision - and which I encourage everyone here to refer to in order to make their own decisions.
- https://zh.wikipedia .org / wiki / Java_Code_Coverage_Tools -根据Wikipedia的性质,它更像是一个活动文档,并希望将其更新为可用的任何新相关工具。
- The以下内容也应属于活动文档的同一类别,但属于可能的偏见/利益冲突-因为每个人都来自也提供此类工具的供应商或组织:
- http://www.eclemma.org/resources.html(提供EclEmma,JaCoCo)
- https://confluence.atlassian.com/display/CLOVER/Comparison+of+code+coverage+tools (提供了Atlassian Clover)
- https://en.wikipedia.org/wiki/Java_Code_Coverage_Tools - by Wikipedia's nature is more of a "living document", and will hopefully remain updated with any new related tools that may become available.
- The following should also somewhat fall into the same category of a "living document", but fall under probable bias / conflicts of interest - as each is from the vendor or organization that also produces such a tool:
- http://www.eclemma.org/resources.html (Provides EclEmma, JaCoCo)
- https://confluence.atlassian.com/display/CLOVER/Comparison+of+code+coverage+tools (Provides Atlassian Clover)
- 声纳中的代码覆盖率工具(JaCoCo,Cobertura和Emma)比较(2012-12-19,Patroklos Papapetrou,onlysoftware.wordpress.com)
- 适用于Eclipse插件代码覆盖率(2012年1月28日,stackoverflow.com)
- 测试范围:jaCoCo与Clover2 (雅库布·库伦达,2010-12-28,kurlenda.blogspot.com)
- Java代码覆盖率:Cobertura与Emma与Clover (Tom Borthwick,2010-10-23,copperykeenclaws.com)
- 在Sonar 2.2中选择您的代码覆盖率工具(2010-08-05 ,叶夫根尼·曼德里科夫(Evgeny Mandrikov),sonarqube.org)
- 追求代码质量:不要被覆盖率报告所迷惑(Andrew Glover,2006年1月31日,ibm.com)
- Code Coverage Tools (JaCoCo, Cobertura, Emma) Comparison in Sonar (2012-12-19, Patroklos Papapetrou, onlysoftware.wordpress.com)
- Eclipse plugin for code coverage (2012-01-28, stackoverflow.com)
- Test coverage: jaCoCo vs Clover2 (Jakub Kurlenda, 2010-12-28, kurlenda.blogspot.com)
- Java Code Coverage: Cobertura vs. Emma vs Clover (Tom Borthwick, 2010-10-23, copperykeenclaws.com)
- Pick your code coverage tool in Sonar 2.2 (2010-08-05, Evgeny Mandrikov, sonarqube.org)
- In pursuit of code quality: Don't be fooled by the coverage report (Andrew Glover, 2006-01-31, ibm.com)
上一个 :
Previous:
它能完成工作,它是免费的并且是开源的,它比 EMMA ,我熟悉的其他大多数在线开源项目都使用了它。
It does the job, it is free and open-source, it is more up-to-date than EMMA, and it is used by most of the other online open-source projects I'm familiar with. It also integrates very well into Maven - including some rather nice-looking reports.
如果您想考虑商业产品,我会考虑Atlassian的三叶草。
If you want to consider a commercial product, I'd consider Atlassian's Clover.
这篇关于Eclipse插件,覆盖代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!