日食中的科贝尔图拉
我刚刚安装了 ecobertura 插件,但它看起来不像 eclipse 中的一个非常用户友好的工具。 eclipse中有没有什么好的cobertura插件或者文章来描述如何使用ecobertura?
我习惯以一种非常好的方式看待代码复杂性和覆盖率等。
我需要使用 cobertura,因为后端的构建系统使用它,所以在 IDE 中使用它也很有意义。
问候
I just installed ecobertura plugin, but it looks like not a very user-friendly tool from within eclipse. is there any good plugin for cobertura in eclipse or article to describe how to use ecobertura?
I'm used to seeing code complexity and coverge etc in a very nice way.
I need to use cobertura, because the build system in the back-end uses it, so it makes sens to use it in the IDE as well.
Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我正在为我们的团队成员寻找开始使用 eCobertura 的教程,并在这里找到了。最后我自己写了一篇。回到这里希望它可以帮助其他寻求快速起步的人。
http://kennethxu.blogspot.com/2012/01/cobertura -and-eclipse-ecobertura.html
I was looking for a tutorial for our team members to start using eCobertura and came across here. I end up writing one myself. Posting back here hope it may help others looking for a jump start.
http://kennethxu.blogspot.com/2012/01/cobertura-and-eclipse-ecobertura.html
来自 来源:
但您仍然可以分叉代码库(例如 mileszk 所做的)并添加您想要的任何功能(并回馈当然是主要项目;))
From the sources:
But you still can fork the code base (like mileszk did) and add any feature you want (and contribute back to the main project of course ;) )
我正在使用 Eclipse Luna,但在安装 ecobertura 插件时遇到了困难。所以我安装了 EclEmma 插件,使用它很直观。安装插件后,重新启动eclipse IDE。
要查找您编写的测试用例的覆盖率,您所要做的就是
右键单击所需的包甚至整个项目> >覆盖范围为> Junit Test
覆盖率视图会自动出现。或者您可以从“Window >”打开覆盖视图显示视图>其他>爪哇>覆盖范围。或者您可以在 Eclipse 的快速访问搜索框中输入“Coverage”。
覆盖率视图能够显示项目级别、源文件夹级别、包级别、类级别甚至方法级别的覆盖率百分比。
您可以使用覆盖视图中的工具栏更改覆盖树中显示的条目的根级别。
您可以根据您的要求将覆盖参数更改为方法或行或指令或分支。
最后,您可以通过右键单击内部任意位置将测试覆盖率结果导出为 HTML 或 XML 或 CSV 格式覆盖率视图并选择导出会话。
I am using Eclipse Luna and I had difficulty installing the ecobertura plugin. So I installed EclEmma plugin and it was intitutive to use it. After installing the plugin, restart the eclipse IDE.
To find the coverage of the test cases you have written, all you have to do is
Right click on the desired package or even the whole project > Coverage As > Junit Test
The Coverage View automatically appears. Or you can open the coverage view from Window > Show View > Other > Java > Coverage. Or you can just type "Coverage" in the Quick Access search box in the eclipse.
The Coverage view is capable of displaying the coverage percentage at project level, source folder level, package level, Class level and even at method level.
You can change the root level of the entries shown in the coverage tree by using the toolbar in the coverage view.
You can change the coverage parameters to method or Line or instruction or brach based on your requirement.
And finally you can export the test coverage results to HTML or XML or CSV formats by right-clicking anywhere inside the coverage view and selecting Export session.