Record and run UFT tests remotely

This topic describes how to record and run your UFT test remotely using your SRF lab.

Configure the connection to SRF

Ensure that you have a valid connection to the SRF lab before running your Web or Mobile tests remotely.

Do the following:

  1. On the SRF settings page, generate a client ID and secret to use when accessing SRF.

    For details, see Manage remote access.

  2. In UFT, browse to the StormRunner Functional pane in the Options dialog box (Tools > Options > GUI Testing > StormRunner Functional).

  3. Enter the values for your SRF access, as well as proxy access as needed. Use the client ID and secret values you generated in SRF.

  4. Click Test Connection to verify that your details are correct.

Back to top

Define the Record and Run settings

Open your test, and define the Record and Run Settings on the Web or Mobile tabs.

Define settings to perform Web testing

  1. On the Web tab, select Open the following when recording or running, and then select Use: Micro Focus SRF.

    For example:

  2. Define the URL you want to open in the SRF lab, the tunnel you want to use if needed, and your test environment.

  3. (Optional) Data drive your tests during runtime by modifying browser and device values for each test iteration.

    For more details, see Data drive your tests during runtime and SRF parameter values.

Define your settings to perform Mobile device testing

  1. On the Mobile tab, select Use StormRunner Functional.

    For example:

  2. Define your test device as follows:

    • Under Device Capabilities, define the capabilities you require so that SRF can find a device for you.
    • Under Specific Device, select a specific device from the SRF lab.
  3. Under App Settings, do the following:

    • Select the apps you need for your test.
    • Define whether you want the selected apps to be installed and restarted before each test run, and uninstalled at the end.
    • Define which app you want to launch at the start of your test.
  4. If you are testing on a web browser, define additional settings on the Web tab, including a URL to open at the start of your test, and any parameterization details needed.

    For more details, see Data drive your tests during runtime.

Back to top

Record a UFT mobile test remotely

Remote recording is supported for mobile devices only. To record your mobile test, do the following:

  1. Configure your Record and Run Settings for mobile testing in SRF. For details, see Define your settings to perform Mobile device testing.

  2. Click Record on the UFT toolbar to start recording.

    A mobile device from the SRF mobile lab is shown in the remote access window.

  3. Perform actions on the mobile device to record your test.

  4. Click Stop when you're done to stop recording. Your test is saved in UFT.

The remote access window remains open after you finish recording so that you can continue to spy and add objects to your test's object repository. The remote access window will lose connectivity with the device after 15 minutes of inactivity.

Note: If you update your Record and Run Settings and start recording on a second device, the remote access window with the first device is closed, and then device is released.

For more details, see the UFT Help Center.

Back to top

Run UFT tests remotely

After configuring your Record and Run Settings, run your tests as you would otherwise.

For more details, see:

Record and Run Settings
Run your test

Back to top

Data drive your tests during runtime

Data drive your tests during runtime by modifying browser and device values for each test iteration.

In the Web tab of the Record and Run Settings dialog:

  1. Select Parameterize runtime web settings using.

  2. Define your parameter value location:

    • GlobalData Table. For global parameters, defined in the Data table.
    • Test Parameter. For test parameters, defined in the Properties pane.
  3. Define the name of the parameter used to define the browser. (Default = Browser)

  4. Prepare the parameter values in your selected location. For details, see SRF parameter values.

    Note: Some mobile testing and device parameters may not be pre-defined in your data table.

    In such cases, add these parameter columns manually.

SRF parameter values

The following table describes the supported parameters used when data driving your test remotely in SRF.

Browser

Mandatory. One of the following:

  • CHROME
  • FIREFOX
  • IE
  • MOBILE_CHROME for the native Chrome browser on Android.

  • MOBILE_SAFARI for the native browser on iOS.
browser_identifier

One of the following:

  • com.hp.mobileweb. Uses the Mobile Web app

  • Leave this value blank to use a native mobile browser, and then also set the device_ostype parameter.

    This enables Mobile Center to automatically define the browser identifier.

Browser_version

N/A for mobile devices.

For desktop browsers, one of the following:

  • A browser version number.

  • latest, or leave this value blank to use the latest version available.

device_manufacturer

Defines the device manufacturer.

Enter a value only when testing on mobile devices. Leave this value blank to use any device available.

device_model

Defines a device name, and must be one of those listed in the Device dropdown list in the Record and Run Settings dialog box.

Enter a value only when testing on mobile devices. Leave this value blank to use any device available.

device_ostype

One of the following:

  • Android
  • iOS

Mandatory if the Browser value is set to MOBILE_HPEWEB.

Enter a value only when testing on mobile devices. Leave this value blank to use any device type available.

device_osversion

Defines the device's operating system version. Leave this value blank to use any device OS version available.

host Defines the device ID, as defined in Mobile Center. Required for running the test on mobile devices (as opposed to on the Chrome emulator).
OS

Mandatory for desktop web testing, N/A for mobile devices.

One of the following:

  • Windows 7
  • Windows 10
  • Windows 8.1
  • Ubuntu 16.04

Resolution

N/A for mobile devices.

One of the following:

  • 1024x768
  • 800x600
  • 1280x1024

  • 1366x768

  • 1600x900

  • 1920x1080

Leave this value blank to use the default resolution (1024x768).

Target

Enter SRF to use StormRunner Functional when you run your test.

Leave this value blank to run your test locally or using Mobile Center.

Tunnel_name

If you need a tunnel to connect to your application from SRF, enter the tunnel name as shown in SRF.

Note: Use only one tunnel per test. Switching tunnels between iterations in the same test may cause unexpected behavior.

For more details, see Manage tunnels.

Back to top

See also: