4

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

Lavekush Agrawal
  • 6,040
  • 7
  • 52
  • 85
a.t.obulreddy
  • 239
  • 2
  • 4
  • 13

2 Answers2

3

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

Anvesh Yalamarthy
  • 1,625
  • 20
  • 36
  • This can be done.But here the problem, Device ID has to enter manually and run the test cases. Is there any way where device ID can take automatically and run across the devices ? – a.t.obulreddy Aug 14 '14 at 08:26
  • 2
    Yes you can write a script to capture adb devices output, grep the device id and give out the command.. it should be possible with perl.. – Anvesh Yalamarthy Aug 14 '14 at 08:57
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.

Dnavir
  • 556
  • 3
  • 11