Here you can find details about what should be done to run Android devices simultaneously:
http://appium.io/slate/en/master/?java#parallel-android-tests
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
builder.redirectErrorStream(true);
appium = builder.start();
Thread.sleep(3000); //wait 3 sec until server started
} catch (Exception e) {
e.printStackTrace();
}
}
private List getCmd(){
//create cmd by adding each param
List cmd = new ArrayList();
cmd.add(“node”);
cmd.add(“path to appium folder”);
cmd.add("-a");
cmd.add(“ip address”);
cmd.add("-p");
cmd.add(“appium port”);
cmd.add("-bp");
cmd.add(“bootstrap port”);
cmd.add("-U");
cmd.add(“udid”);
cmd.add("–chromedriver-port");
cmd.add(“chrome port”);
return cmd;
}
public void stopAppium(){
//stop appium instance
appium.destroy();
}