无法获取艾玛覆盖率为Android艾玛、率为、Android

2023-09-07 16:15:54 作者:想你想的,我骨头痛。

可能重复:   generating code覆盖率报告对于Android测试项目

我现在面临一个Android项目艾玛覆盖范围的问题。 我能够生成build.xml文件的项目和测试项目。 但是,当我运行蚂蚁报道我得到了以下错误:

I am facing a problem in Emma Coverage for an Android Project. I am able to generate the build.xml for the Project and the Test Project. But when I run "ant coverage" I do get the following error:

Buildfile: C:\Documents and Settings\user\workspace\HelloAndroidTest\build.xml
BUILD FAILED
Target "coverage" does not exist in the project "HelloAndroidActivityTest".

Total time: 0 seconds

我需要改变我的build.xml文件的任何项目? 如果是,什么是最佳的变化?

Do I need to change my build.xml file for any of the projects? If Yes, what would be the optimum change?

推荐答案

最新SDK使用艾玛通过把艾玛在构建的前面:

The newest SDK uses emma by putting emma in front of the build:

ant emma debug install
ant emma debug install test

首先是从您的项目总监,第二次测试目录中运行。这样做将产生的全覆盖报告。注:在为了这个工作,你需要运行在一个有根的手机模拟器或

The first is run from your project director, the second the test directory. Doing so will generate the full coverage report. Note: That in order for this to work you do need to be running the emulator or a on a rooted phone.

有关详细信息,请参阅: http://developer.android.com/guide/developing/building/building -cmdline.html

For more details see: http://developer.android.com/guide/developing/building/building-cmdline.html