Appium provides a scenario for launching multiple Android sessions on a single device that requires you to enter different instructions to start multiple Appium services.
Important instructions for starting multiple Android sessions include:
-pMain port of Appium
-UDevice ID
-bpAppium Bootstrap Port
--chromedriver-portChromedriver Port (when using webviews or chrome)
--selendroid-portSelendroid Port (when selendroid is used)
More details on the parameters are explained here .
If we have two devices and the device IDs are 43364 and 32456, we should start with the following command for two different Appium services:
node . -p 4492 -bp 2251 -U 32456
node . -p 4491 -bp 2252 -U 43364
As long as your appium and Appium bootstrap ports are between 0 and 65536, and are guaranteed to be two different ports so that two appium services will not listen on the same port. Verify that your-u parameter is bound to the correct device ID. This allows Appium to know which device to connect to, so the parameters must be accurate.
If you use Chromedriver or selendroid, different services will be set up with different ports.
iOS concurrency Test
Unfortunately, iOS cannot perform local concurrency tests. Unlike Android, iOS can only launch one version of the emulator at a time to run multiple tests. If you want to do concurrent testing on iOS, you need to use sauce. Simply upload your appium test script to sauce and it will perform multiple concurrent tests of iOS or Android according to your settings. For more information on performing tests on sauce, see here.
Android concurrency Test