Execute mobile tests in parallel
Mobile Engine 3.0 enables you to run TestCases in parallel, that is at the same time on more than one device, emulator, or simulator. You can execute as many TestCases in parallel as the number of Parallel Execution Licenses you have.
Prerequisites
Running parallel execution on mobile devices, requires the following prerequisites:
-
You have to increase the value for Maximum number of tests to run in parallel in Project->Options->Tosca Data Integrity. The value you set must correspond to the maximum number of tests you want to run in parallel.
-
Make sure to prepare your mobile devices for parallel execution.
-
Make sure to configure your mobile tests for parallel execution.
Prepare mobile devices for parallel execution
If you have already run standard Mobile Engine 3.0 TestCases on your devices, you need to reset your configuration.
To do so, remove previously installed Appium components from your mobile devices before you create a new Appium session. You may have to restart the Appium server.
Configure mobile tests for parallel execution
You can run parallel execution in the following ways:
-
Use multiple Appium servers. To do so, create test configuration parameters for each device as described in chapter "Configure tests for mobile test automation".
-
Create a multisession on one Appium server as described in, chapter "Run parallel execution using one Appium server".
Run parallel execution using one Appium server
You can create a multisession on one Appium server to run tests on different devices and mobile operating systems in parallel.
When you run tests in parallel using mobile clouds and one Appium server, you don't have to configure additional Desired Capabilities. |
To run parallel execution using one Appium server, follow the steps below:
-
Create Desired Capabilities by adding the standard Module Set Desired Capabilities.
-
Configure Desired Capabilties according to your mobile operating system as described in the table below.
Mobile devices |
Desired Capabilities configuration |
---|---|
2 or more Android devices |
Use a different systemPort Desired Capability for each device. |
2 or more iOS devices |
Use a different webkitDebugProxyPort and wdaLocalPort Desired Capability for each device. |
1 Android device and 1 iOS device |
You don't have to specify any Desired Capabilities. |
Run parallel execution on mobile devices
To run Mobile Engine 3.0 TestCases in parallel, follow the steps below:
-
Move all configured ExecutionLists to an ExecutionLists Folder.
Ensure that the ExecutionLists Folder contains only ExecutionLists configured for mobile test execution.
-
On the ExecutionLists Folder level, add the test configuration parameter Execute in Parallel and set its value to True.
ExecuteInParallel test configuration paramater
-
Right-click the ExecutionLists Folder and select Run from the context menu.