Testing in Parallel
It is possible to execute tests in parallel using XCUITest driver. Appium allows to do this on a per-process (multiple server processes running on different ports managing single session) or a per-request basis (single server process managing multiple sessions, more preferable, uses less resources and ensures better control over running sessions).
Note
If you are not going to run your tests in parallel, consider enabling the --session-override
Appium server argument. It forces the server to close all pending sessions before a new one
could be opened, which allows you to avoid possible issues with such sessions silently
running/expiring in the background.
Important Real Device Capabilities¶
udidmust be a unique device UDID for each parallel session.wdaLocalPortmust be a unique port number for each parallel session. The default value is8100.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.mjpegServerPortmust be a unique port number for each parallel session if you are going to record a video stream from it. The default value is9100.
Important Simulator Capabilities¶
- Either
udid, which is the unique simulator UDID for each parallel session (it could be retrieved fromxcrun simctl listcommand output), or a unique combination ofdeviceNameandplatformVersioncapabilities to 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 is8100.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.mjpegServerPortmust be a unique port number for each parallel session if you are going to record a video stream from it. The default value is9100.