Run tests in parallel

Use the ParallelRunner tool to run multiple tests in parallel. You can run multiple types of tests at the same time across various browser or device combinations. This reduces the run time of your test suite and increases delivery speed.

Supported test types and environments

You can run the following types of tests in parallel:

Supported Test Type Description
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.

Note: The ChromiumEdge value is supported for backward compatibility only. Use Edge instead. Both refer to Microsoft Edge.

GUI Mobile test

Parallel testing on mobile devices is supported when using mobile devices from a lab, not when testing on local devices.

AI-based testing

ParallelRunner supports running the following types of AI-based tests: 

  • AI-based tests on desktop web applications.

  • AI-based mobile tests.

Java test (tech preview)

Parallel testing on the following applications is supported:

  • Java applications in various environments such as Oracle JRE, openJDK, ZuluOpenJDK, and IBM JRE

  • JavaFX applications, SWT applications, Swing applications, and AWT applications

API test ParallelRunner supports API tests, API tests called by GUI tests, and vice versa.

Back to top

Before starting parallel testing

Before you start parallel testing, do the following:

License check

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.

Access to ParallelRunner port Make sure that the firewall on the OpenText Functional Testing computer does not block the port used by the ParallelRunner (50051 by default).
Web testing

Review the following before starting your parallel run:

  • Modify your test scripts to run test steps in isolated mode.

  • To run your tests on Safari, make sure you first set up the connection to the Mac computer. See Connect to a remote Mac computer.

  • If you specify web browsers in the command line, these browsers are launched before running the test. This overrides the browser settings defined in the Record and Run Settings, and any browser parameterization configured in the test.

    This means:

    • 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 ignored 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.

Mobile testing

Modify your test scripts to run test steps in isolated mode.

Mobile web testing

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.

AI-based desktop web testing

Review the following before starting your parallel run:

Java testing

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.

Back to top

Run steps in isolated mode

Relevant for GUI Web and Mobile tests

When running multiple tests in parallel that have 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 a smooth test run, configure the steps and settings to run in isolated mode by surrounding them with the following utility steps:

  • ParallelUtil.StartIsolatedExecution
  • ParallelUtil.StopIsolatedExecution

For AI-based desktop web testing, each test step must be surrounded with the above utility steps.

Example 1: Configure test steps to run in isolated mode:

ParallelUtil.StartIsolatedExecution
Browser("Advantage Shopping").Page("Google").WebEdit("Search").Click
Dim mySendKeys
set mySendKeys = CreateObject("WScript.shell")
mySendKeys.SendKeys("Values")
ParallelUtil.StopIsolatedExecution

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

For more details, see the ParallelUtil and Setting object reference in the Object Model Reference for GUI Testing.

Back to top

Modify the ParallelRunner port

ParallelRunner uses the port configured in the parallel.ini file located in the <Installdir>/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 <Installdir>/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:

    [Mediator]
    Port=<port number>

    The parallel.custom.ini file overrides any configuration in the parallel.ini file.

Back to top

Modify the image processing mode

Relevant for AI-based desktop web testing

When running multiple tests in parallel, ParallelRunner uses the settings defined in the parallel.ini file located in the <Installdir>/bin directory. To be able to run AI-based tests in parallel, you must modify the default image processing mode defined in the file in advance.

Modify the default mode by doing one of the following:

  • Open the <Installdir>/bin/parallel.ini file, and change the value of the UseStream parameter to 1.

  • 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:

    [Mediator]
    UseStream=1

    The parallel.custom.ini file overrides any configuration in the parallel.ini file.

Back to top

Configure your parallel test run

Before you start parallel testing using ParallelRunner, configure your parallel test run in one of the following ways:

Back to top

Start parallel testing

Depending on how you configure your parallel test run, start parallel testing in one of the following ways:

Back to top

See also: