问题描述
你怎么一个特定的设备上运行connectedAndroidTest?
How do you run connectedAndroidTest on a particular device?
我希望是这样的:
./ gradlew connectedAndroidTest -DconnectedAndroidTest.device = XXXX
./gradlew connectedAndroidTest -DconnectedAndroidTest.device=XXXX
我们有一些插入到我们的CI服务器设备的我似乎无法找到如何针对特定连接的设备的任何文档。
We have a number of devices plugged into our CI server and I can't seem to find any documentation on how to target a specific connected device.
connectedAndroidTest运行在目前所有连接的设备测试。
connectedAndroidTest runs the tests on ALL connected devices currently.
感谢。
推荐答案
它不支持。为 connectedCheck
在http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Android-tasks,委托给 connectedAndroidTest
为这些类型的设备上非UI自动化测试,明确规定:
It's not supported. The documentation for connectedCheck
at http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Android-tasks, which delegates to connectedAndroidTest
for these sorts of on-device non-UI-automated tests, explicitly states:
运行,需要连接的设备或支票
模拟器。他们将在所有并联连接的设备上运行。
有是选择单个设备的能力的功能要求;你可以在<一个跟踪其进度href=\"https://$c$c.google.com/p/android/issues/detail?id=66129\">https://$c$c.google.com/p/android/issues/detail?id=66129
There is a feature request for the ability to select individual devices; you can track its progress at https://code.google.com/p/android/issues/detail?id=66129
这篇关于一个特定的设备上运行gradle这个的connectedAndroidTest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!