J2ME覆盖工具
我需要估计测试集的代码覆盖率。 这些测试在物理设备上的 J2ME 应用程序上运行。 MIDP 2.1、CLDC 1.1 和 JSR-75 FileConnection 可用。 由于 J2ME(大致)是 J2SE 的子集,因此无法使用使用 java.io.File 的工具(如迄今为止唯一答案中列出的那些工具......)。
这主要是为了识别测试根本没有触及的代码片段。
如果能够在之后任意组合报告数据也很好,这样我就可以看到新的测试实际上增加了多少覆盖率。
有没有 Cobertura4j2me 的替代品?
I need to estimate the code coverage of a test set.
The tests are run on a J2ME application, on a physical device.
MIDP 2.1, CLDC 1.1 and JSR-75 FileConnection are available.
As J2ME is (roughly) a subset of J2SE, tools using java.io.File (like those listed in the only answer so far..) can not be used.
This is mainly to identify pieces of code the tests do not touch at all.
It would also be nice to be able to combine the report data arbitrarily afterwards, so I can see how much a new test actually increases coverage.
Are there any alternatives to Cobertura4j2me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有很多 Java 代码覆盖率工具。 其中许多都使用由于空间限制而在嵌入式系统中不可用的 JVM 功能。
中找到仅使用附加布尔数组来保存覆盖率数据的数组。
可以在http ://www.semanticdesigns.com/Products/TestCoverage/JavaTestCoverage.html
您必须编写一个额外的例程,将该数组从嵌入式设备转储到 PC 上的文件中,但这通常是一项非常简单的任务(例如,一次工作几个小时)。
There's lots of Java code coverage tools. Many of them work by using JVM features not available in embedded systems due to space limitations.
One that uses only an additional boolean array in which to hold the coverage data can be found at
http://www.semanticdesigns.com/Products/TestCoverage/JavaTestCoverage.html
You have to code an additional routine that dumps that array out of your embedded device into a file on a PC, but that's generally a pretty easy task (e.g., several hours work, once).
这里有很多替代方案。
http://java-source.net/open-source/code-coverage
Here's a slew of alternatives.
http://java-source.net/open-source/code-coverage