J2ME覆盖工具

发布于 2024-07-06 15:26:18 字数 370 浏览 9 评论 0原文

我需要估计测试集的代码覆盖率。 这些测试在物理设备上的 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 技术交流群。

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

发布评论

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

评论(2

不忘初心 2024-07-13 15:26:18

有很多 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).

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