Cross-platform testing

UFT One tests can use the same scripts to test multiple applications, on multiple devices and platforms.

Test multiple devices

Use the Record and Run settings, object properties, and descriptive programming to record and run on multiple applications and devices.

For example, the following script shows a single test.

This test uses Web methods as well as Mobile methods to perform steps on a mobile device, and then moves on to select list items on a second mobile device.

Browser("Google ").Page("Google").WebEdit("Search").Set "hp"Browser("Google ").Page("Google").Link("HP Support and Drivers").Click
Device("Device").App("Mobile Browser").MobileEdit("url").SetFocus
Device("Device").App("Mobile Browser").MobileEdit("url").Set "http://www.bing.com"
Device("Device_2").App("UICatalog").MobileList("list").Select 5
Device("Device_2").App("UICatalog").MobileList("listview_1").Select 0

For more details, see:

Back to top

Test multiple platforms

Record a test using one mobile operating system, and then run the test on another.

Adjust the App test object properties when switching back and forth between Android and iOS.

Tip: The following examples show App test object properties for the Digital Lab Browser (UFTM Browser) app. Replace the values as needed when using a native browser.

iOS "identifier:=com.hp.HPMobileWebBrowserINJ"
"name:=HPE Mobile Web"
Android "identifier:=com.hp.mobileweb"
"name:=HPE Mobile Web"

Adjust these properties by:

  • Manually changing the values in the object repository

  • Parameterizing the properties in the object repository

  • Using the App.SetTOProperty method

For more details, see the App test object in the UFT One Object Model Reference.

Back to top

Test Web on mobile

Record your Web tests on a desktop browser, and then run them on a mobile browser using the Mobile Web app.

To do this, you must have both the Mobile and Web Add-ins loaded.

Alternatively, consider using the Chrome emulator to record and run tests on Web apps. The Chrome emulator enables you to run the same test on both desktop and mobile browsers, as well as test devices not yet supported by UFT One.

For more details, see Define settings to test Web apps using the Chrome emulator.

Note: The Mobile Web app supports replaying web tests only.

Back to top

Prepare for BPT testing on multiple devices

Application area settings are limited to a single device and application. To test multiple devices or applications simultaneously, do the following:

  1. Create an object repository parameter for the Device and/or the App test object's id or identifier description property.

    For details, see:

  2. Associate the parameter with your component, business process test, or flow test parameter.

  3. Change the value of that parameter to represent a different device or app ID for each test iteration, as needed.

Tip: Alternatively, insert an App.Launch statement as a component step to launch your mobile application.

For details, see the Mobile section of the UFT One Object Model Reference for GUI Testing.

Back to top

Use a description property to identify your device

Create a device id property that is used in the server's script or settings to identify the correct device to open.

Do the following:

  1. Open your test in UFT One.
  2. Add the id description property to the Device test object.

  3. Add a device_id test input parameter.

    For more details, see Use action and test parameters.

Use a description property to identify your application

Create an application identification property that is used in the server's script or settings to identify the correct application to open when the test is run.

  1. Open your test in UFT One.

See also: