This documentation is deprecated. Please refer to the README in the Appium repository or Appium 2.0 documentation.
Edit this Doc Parallel Android Tests
Appium provides a way for users to automate multiple Android sessions on a single machine on single server instance. All it involves is starting Appium server on any available port.
Note, that it is not possible to have more than one session running on the same device.
The important capabilities:
- udidthe device id
- chromedriverPortthe chromedriver port (if using webviews or chrome)
- mjpegServerPortIf you are using appium-uiautomator2-driver, set a unique MJPEG server port for each parallel session. Otherwise you might get a port conflict such as in this issue.
- systemPortIf you are using appium-uiautomator2-driver, set a unique system port for each parallel session. Otherwise you might get a port conflict such as in this issue.
- chromedriverPortIf you are using appium-chromedriver, set a unique ChromeDriver port for each parallel session. Otherwise, you might get a port conflict with the error message- Address already in use (48)in the ChromeDriver log.
Parallel iOS Tests
Since Xcode9, Appium supports parallel RealDevice and Simulator testing. Start your Appium Server on any available port.
The important capabilities:
RealDevice
- udidmust be a unique device UDID for each parallel session
- wdaLocalPortmust be a unique port number for each parallel session. The default value is 8100
- derivedDataPathset the unique derived data path root for each driver instance. This will help to avoid possible conflicts and to speed up the parallel execution.
Simulator
- Either udid, which is the unique simulator UDID for each parallel session(this can be retrieved from xcrun simctl list) or a unique combination ofdeviceNameandplatformVersionto identify the appropriate simulator with the given name and version number for each parallel session
- wdaLocalPortmust be a unique port number for each parallel session. The default value is 8100
- derivedDataPathset the unique derived data path root for each driver instance. This will help to avoid possible conflicts and to speed up the parallel execution.
Troubleshooting
When running on Jenkins, watch out for the ProcessTreeKiller when running multiple parallel test jobs on the same machine. If you are spawning simulators in one test job, Jenkins might kill all your simulators when the first test ends - causing errors in the remaining test jobs!
Use BUILD_ID=dontKillMe to prevent this from happening.
