发电code覆盖率报告为Android测试项目 [英] generating code coverage report for android test project

查看:142
本文介绍了发电code覆盖率报告为Android测试项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得一个覆盖率报告我的Andr​​oid JUnit测试项目并按照<一href="http://blog.rabidgremlin.com/2010/11/19/android-tips-generating-a-coverage-report-for-your-unit-tests/"相对=nofollow>这个指南这样做

i am trying to get a coverage report for my android junit test project and following this guide to do so

android update test-project -m <path to app project> -p <path to test project>

工作的罚款。它产生一个build.xml和更新project.properties, local.properties和proguard.cfg。

worked fine. it generated a build.xml and updated project.properties, local.properties and proguard.cfg.

但是当我改变目录测试项目的目录,然后输入命令

but when I change directory to test project directory and enter command

ant coverage

它给了我这个错误。

it gives me this error.

BUILD FAILED
Target "coverage" does not exist in the project "My Project Test".

Total time: 0 seconds

我使用Windows XP。

I am using windows xp.

推荐答案

哪个SDK工具版本您使用的?如果是14或更高版本,你需要使用蚂蚁艾玛调试安装测试而不是蚂蚁报道

Which SDK Tools version are you using? If it is 14 or later, you need to use ant emma debug install test instead of ant coverage

这篇关于发电code覆盖率报告为Android测试项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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