Android的测试code覆盖时,Eclipse测试、Android、Eclipse、code

2023-09-12 03:42:55 作者:緈諨dē味噵

有没有办法从Eclipse在将仪器code,测量测试code覆盖的方式运行单元测试,为Android?

Is there a way to run unit tests for Android from Eclipse in a way that will instrument the code and measure test code coverage?

我在找一个简单的方法来找出未经测试我的应用程序的某些部分还没有,修复测试用例,看看有没有帮助。

I'm looking for a simple way to find out which parts of my application aren't tested yet, fix the test cases and see if that helped.

推荐答案

免责声明:我是一个Atlassian的

在Atlassian的四叶草工具还支持Android - 其测量范围为应用程序code和单元测试。虽然在alpha阶段,它工作得很好 - 它可以与Eclipse版本3.6.2或更高。

The Atlassian Clover tool has also support for Android - it measures coverage for both application code and unit tests. Although in alpha stage, it works quite well - it works with Eclipse version 3.6.2 and higher.

如果你想找到需要改进的应用领域,那么下面的四叶草功能将非常适合这个任务:

If you want to find areas of your application which require improvement, then the following Clover features will be perfect for this task:

四叶草控制台 覆盖云报告 覆盖TreeMap的报告 覆盖浏览器

哦,三叶草HTML报表看起来棒极了!

Oh, and the Clover HTML Report looks fantastic!

检查:https://confluence.atlassian.com/display/CLOVER/Clover-for-Android