无法获取艾玛覆盖率为Android [英] Unable to get Emma Coverage for Android

查看:148
本文介绍了无法获取艾玛覆盖率为Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
  <一href="http://stackoverflow.com/questions/8295834/generating-$c$c-coverage-report-for-android-test-project">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

这篇关于无法获取艾玛覆盖率为Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆