你怎么推的Andr​​oid仪器测试到模拟器/设备? [英] How do you push Android Instrumentation Tests to Emulator/Device?

查看:224
本文介绍了你怎么推的Andr​​oid仪器测试到模拟器/设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行使用命令行shell在Ubuntu 9.04 Android模拟器WebKit的布局测试。

I'm trying to run the Webkit Layout Tests on the Android emulator using the command line shell in Ubuntu 9.04.


adb -s emulator-5554 shell am instrument -w \
com.android.dumprendertree/com.android.dumprendertree.LayoutTestsAutoRunner

我得到这个错误:


INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{com.android.dumprendertree/com.android.dumprendertree.LayoutTestsAutoRunner}

我发现,你需要使用的开发/的TestRunner / runtest.py推测试,机器人/框架/基/测试。

I found that you need to use development/testrunner/runtest.py to push tests in android/frameworks/base/tests.

我已经试过这推AndroidTests:

I've tried this to push the AndroidTests:


. ./build/envsetup.sh
 emulator&
./development/testrunner/runtest.py android

但它给了我这个错误:

Error: ANDROID_PRODUCT_OUT not defined. Please run envsetup.sh

我也跑envsetup.sh!任何人都知道如何做到这一点?

I did run envsetup.sh! Anyone know how to do this?

推荐答案

我发现在的 Android的 - 仪表测试

I've found an answer at Android - Instrumentation Testing


. build/envsetup.sh
(cd frameworks/base/tests/DumpRenderTree/ && mm) && \
adb install out/target/product/generic/data/app/DumpRenderTree.apk

然后就可以运行仪器测试:

Then you can run the instrumentation tests:


adb -s emulator-5554 shell am instrument -w \
com.android.dumprendertree/com.android.dumprendertree.LayoutTestsAutoRunner

这篇关于你怎么推的Andr​​oid仪器测试到模拟器/设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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