Support for automating multiple devices simultaneously:

appium - 1.2.2
Can we automate multiple android devices in a single session of appium?

was able to automate multiple devices in different sessions i.e., on different ports

by defining two drivers

want to know if there is way to do in a single session so that one statement can be executed on both the device at the same time simultaneously

than having to wait for a statement execution from a different driver

I think you may use Selenium Grid with Appium to run tests in parallel.

Selenium Grid may have some issues I’m about to post some bugs that I have found.

Can you Please suggest how to run multiple device with different session and with different port .
we can’t able to make it .
Please help us to make it possible

Here you can find details about what should be done to run Android devices simultaneously:
Unfortunately, it’s not working for iOS devices.

So you could do this manually, via script, CI tool or using java.

My java example, it’s not the best solution ever, however it may helps you:

public void startAppium() {
    //start appium instance
    try {
        Thread.sleep((long)(Math.random() * 10000)); //wait from 0 to 10 sec for parallel process run
        ProcessBuilder builder = new ProcessBuilder(getCmd());
        builder.redirectOutput("path to log file"); //here you can find logs of appium
        appium = builder.start();
        Thread.sleep(3000); //wait 3 sec until server started
    } catch (Exception e) {

private List getCmd(){
//create cmd by adding each param
List cmd = new ArrayList();
cmd.add(“path to appium folder”);
cmd.add(“ip address”);
cmd.add(“appium port”);
cmd.add(“bootstrap port”);
cmd.add(“chrome port”);
return cmd;

public void stopAppium(){
//stop appium instance

Watch my videos. May be it will help you to solve you issues


If you don’t want to set up (and administrate) different appium endpoints in your test project, you may want to give a try to this tool I wrote: Appium Proxy.

Basically, it’s a python script that starts a web proxy, hooks to session creation requests and distributes the handling of the sessions among different appium server instances. So you can use a single endpoint in your tests configuration.

It’s just a PoC but works for me (at least for what I need).



Hi Sendlink,

Can you help me how to run multiple tests on multiple devices with different appium sessions?

It can be great if you can tell me list out the steps you followed?


Hi @UD,
Were you able to run tests on multiple devices. I need to run mobile web test on android phone as well as on iPhone. So is there any way to do so parallely?

Any help would be appreciated.


I am trying to run a test script written in ruby on multiple devices.
I am not able to run the scripts in parallel.

what I have tried:

  1. launch and start multiple appium server isntances with different ports (appium port, chromedriver, bootstrap-port & selendroid-port.
    this works fine and servers have started

  2. however when I create driver, multiple drivers are created, but test script runs on only the first device (first device detected on adb) , it never runs on the second device.

this is how I start the server:
node.exe Appium.js --address --port # {a} --chromedriver-port --bootstrap-port # {} --selendroid-port #{} --device-name F9AZCY00U236 --no-reset --local-timezone"


desired_caps = {
# caps: {
platformName: ‘Android’,
device: ‘Android’,
app: “#{Dir.pwd}/abc.apk”,
browserName: ‘’,
appWaitActivity: “Activity name”,
newCommandTimeout: 120


},config).start_driver{caps: desired_caps,appium_lib: { server_url: ‘’ }}).start_driver

Please let me know what I am missing.

have you already resolved this? encountering it currently.


You need to make sure that you pass device UDID (or device Id), and not the deviceName property. Appium can distinguish between devices only when you provide UDID. Check the code in the below article. It will give an idea of how this can be done. You can implement it with Java Thread, TestNG or any other way you want.

Appium Parallel Execution on multiple devices