Testing multiple Android devices on one machine

后端 未结 4 1878
误落风尘
误落风尘 2021-02-15 11:48

I have two different Android devices plugged into the same machine. What I would like to do is to target each device and execute a test on it separately.

Unfortunately,

4条回答
  •  轮回少年
    2021-02-15 12:06

    You need to set ADB_DEVICE_ARG environment variable to the serial number of your device as returned by adb devices.

    So to add on to Robert's answer:

    $ adb devices
    List of devices attached 
    emulator-5554  device
    emulator-5556  device
    emulator-5558  device
    
    $ ADB_DEVICE_ARG=emulator-5554;calabash-android run yourapk.apk
    

    If you need to run the same Calabash test at the same time on multiple devices, better run them from separate root folders, or specify the result in different folders so that the results don't get mixed up.

提交回复
热议问题