Unable to get Emma Coverage for Android [duplicate]

回眸只為那壹抹淺笑 提交于 2019-12-12 19:12:42

问题


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?


回答1:


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.

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



来源:https://stackoverflow.com/questions/8473852/unable-to-get-emma-coverage-for-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!