How to run Uiautomator tests in to multiple devices?

空扰寡人 提交于 2019-12-10 15:33:26

问题


I am trying to Uiautomator android Ui tests in a .bat file. but i could not able them run parallelly.

Here is my execution flow and have connected 3 devices

-> adb devices XXXX XXXX XXXX

-> adb push ./bin/UiautomatorTests.jar /data/local/tmp/

-> adb shell uiautomator runtest UiautomatorTests.jar -c com.music.tests

Here how can i give a common common command for all the devices to runs with parllely


回答1:


You can checkout Uiautomator-bot as it seems to fit your requirement. It can run UIautomator test cases simultaneously on all connected devices. For further info check this link.




回答2:


You can well use

adb -s <device_id> push ./bin/UiautomatorTests.jar /data/local/tmp/
adb -s <device_id> shell uiautomator runtest UiautomatorTests.jar -c com.music.tests

Using above commands, you can run 3 parallel instances of your automation changing <device id> appropriately

You can find your <device id> from adb devices

Good luck !!



来源:https://stackoverflow.com/questions/25301292/how-to-run-uiautomator-tests-in-to-multiple-devices

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!