java 是否有任何方便的代码覆盖工具可与 JUnit 一起使用?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5269636/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 10:20:21  来源:igfitidea点击:

Is there any handy code coverage tool to be used with JUnit?

javajunit

提问by user496949

Is there handy code coverage tool to be used with JUnit?

是否有方便的代码覆盖工具与 JUnit 一起使用?

采纳答案by Jon Skeet

I would imagine most code coverage tools can be used pretty easily with JUnit. Previously I've used EMMA, which is good. If you're an Eclipse user, there's an Eclipse plugin called EclEmmato integrate things.

我想大多数代码覆盖工具都可以很容易地与 JUnit 一起使用。以前我使用过EMMA,这很好。如果您是 Eclipse 用户,可以使用一个名为EclEmma的 Eclipse 插件来集成东西。

回答by Nilesh

Here are my preferences in that order:

以下是我的偏好顺序:

  1. EclEmma
  2. Clover
  1. 艾玛
  2. 三叶草

And here is a bunch of open source toolsand with comparison.

这是一堆开源工具,并进行比较。

Hope that helps.

希望有帮助。

回答by Nishan

There are many and google is your friend.

有很多,谷歌是你的朋友。

NoUnit

无单位

Coverlipse(I would recommend this, but its an eclipse plugin)

Coverlipse(我会推荐这个,但它是一个 eclipse 插件)

Codecover

代码覆盖