你怎么推的Android仪器测试到模拟器/设备?
问题描述:
我试图运行使用命令行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