How to run Uiautomator tests in to multiple device

2019-06-24 02:50发布

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

2条回答
等我变得足够好
2楼-- · 2019-06-24 03:12

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.

查看更多
SAY GOODBYE
3楼-- · 2019-06-24 03:36

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 !!

查看更多
登录 后发表回答