2

Possible Duplicate:
generating code coverage report for android test project

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

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

4

1 回答 1

3

最新的 SDK 通过将 emma 放在构建前面来使用 emma:

ant emma debug install
ant emma debug install test

第一个是从您的项目主管运行,第二个是测试目录。这样做将生成完整的覆盖率报告。注意:为了让它工作,你需要在有根手机上运行模拟器或 a。

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

于 2011-12-17T03:57:08.103 回答