Run UFT One tests in parallel
Use the ParallelRunner tool to run multiple UFT One tests in parallel. This reduces the run time of your test suite and increases delivery speed.
The ParallelRunner is a tool provided for you to achieve parallel testing in UFT One. You can run multiple types of tests at the same time across various browser or device combinations.
Before you start testing in parallel, configure your parallel test run in one of the following ways:
Use the intuitive UI tool. See Configure your parallel test run.
Directly configure your parallel test run using command options. See Define test run information using command line options.
Manually create a .json file that define multiple tests to run in parallel. See Manually create a .json file to define test run information.
Then you can start parallel testing in one of the following ways:
Supported test types and environments
You can run the following types of tests in parallel:
GUI Web test
Parallel web testing is supported on specific browsers, for controls supported by the Web Add-in. Supported browsers include Chrome, Chrome_Headless, ChromiumEdge, Edge, Firefox, Firefox64, IE, IE64, and Safari.
GUI Mobile test
Parallel testing on mobile devices is supported when using UFT Mobile and not when testing on local devices.
The ParallelRunner supports API tests, API tests called by GUI tests, and vice versa.
Java test (tech preview)
Parallel testing on java applications is supported when using multiple Java environment (such as Oracle JRE, openJDK, ZuluOpenJDK, and IBM JRE) and toolkits (such as JavaFX, SWT, Swing, and AWT), for controls supported by the Java Add-in.
Before starting parallel testing
Before you start parallel testing, do the following:
Ensure that your licenses support your use cases.
Mobile tests: Each license, seat or concurrent, supports running up to four tests in parallel.
All other tests: Running tests in parallel requires a concurrent license server. Each test run consumes a single concurrent license.
Make sure that the firewall on your UFT One computer does not block the port used by the ParallelRunner (50051 by default).
(Optional for API tests) Modify your test scripts to run test steps in isolated mode.
If you are testing mobile web browsers, ensure that the correct browser is selected in the Record and Run Settings, on the Mobile tab.
For more details, see Define settings to test mobile apps.
For web testing, if you specify web browsers, these browsers are launched before running the test. This overrides the settings defined in the Record and Run Settings, and any browser parameterization configured in the test.
For this run, the Record & Run settings are changed to launch the browsers specified.
If the Record and Run settings were set to Record and Run on any open browser, this option is deselected for the current run.
If the Record and Run settings were set to launch specific browsers, these browsers are not launched.
If your test includes WebUtil.LaunchBrowser steps, these will launch additional browser windows. Make sure the test correctly differentiates between the browsers.
If you are testing Java applications, in the Record and Run Settings, on the Java tab, specify the application information to open these applications before the run session starts.
Note: The SystemUtil.Run step is not supported to open Java applications for parallel execution.
Relevant for GUI Web and Mobile tests
When running multiple tests in parallel that have related steps that interact with the same objects, the steps may interfere with each other and cause errors in your parallel test run. In addition, global settings configured specifically for a test may affect the execution of other tests.
To prevent errors and ensure smooth test run, configure the steps and settings to run in isolated mode by surrounding them with the following utility steps:
Example 1: Configure test steps to run in isolated mode:
set mySendKeys = CreateObject("WScript.shell")
Example 2: Configure OCR settings to run in isolated mode:
ParallelUtil.StartIsolatedExecution TextUtil.SetABBYYParameters("removeGarbage", True) TextUtil.ResetABBYYParameters ParallelUtil.StopIsolatedExecution
Example 3: Configure other global settings to run in isolated mode:
ParallelUtil.StartIsolatedExecution Setting(SnapshotReportMode) = 1 ParallelUtil.StopIsolatedExecution
ParallelRunner uses the port configured in the parallel.ini file located in the <UFT One installation folder>/bin directory. The default port is 50051.
If the port configured there is already in use elsewhere, modify it by doing one of the following:
Open the <UFT One installation folder>/bin/parallel.ini file for editing, and modify the port number configured.
If you have permission issues editing this file, create a new file named parallel.custom.ini in the %ProgramData%\UFT One directory.
Add the following code:
The parallel.custom.ini file overrides any configuration in the parallel.ini file.