问题
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