UFT Mobile features in UFT Developer tests

This topic describes how to use various UFT Mobile features in UFT Developer tests.

Fingerprint and facial recognition authentication

When running tests on mobile devices, use the mobile application test object's simulateAuth* methods and properties to simulate fingerprint and facial recognition authentication. For details, see the .NET, Java, and JavaScript SDK references.

Back to top

Simulate scanning a barcode or QR code

In your mobile UFT Developer tests, you can include steps that simulate scanning a barcode or QR code using an image file. Use the mobile application test object's simulateBarcodeScan method in the UFT Developer SDKs. For details, see the .NET, Java, and JavaScript SDK references.

Back to top

Service Virtualization integration (early access)

Note: Supported from UFT Developer 14.51, for UFT Developer Java and .NET tests running on Windows machines.

If your UFT Mobile is set up to integrate with Service Virtualization (SV), your UFT Developer tests can include SV actions in your tests. These steps use scenarios that were created in advance from SV learning sessions.

To use this integration you must perform the following steps:

  1. Set up UFT Mobile integration with SV, and prepare the service and scenario files that you want to use.

    For details, see Service Virtualization integration in the UFT Mobile Help Center.

  2. Set up UFT Developer integration with UFT Mobile.

    For details, see Connect UFT Developer and UFT Mobile and Create mobile tests.

  3. In your mobile test perform the following steps:

    Step Java SDK .NET SDK

    Lock a device and enable SV for this session.

    When locking the device, set the DeviceSessionOptions class's EnableServiceVirtualization property to true.

    setEnableServiceVirtualization

    EnableServiceVirtualization

    Upload the service to the device.

    Sends UFT Mobile the service definition. UFT Mobile then communicates with SV to upload the service.

    svUploadService SvUploadService

    Upload the scenario to the device.

    Send UFT Mobile the path to the folder that contains the scenario definition files. UFT Mobile then communicates with SV to upload the scenario and make it available in this session.

    svUploadScenario SvUploadScenario

    Start the scenario.

    Instruct UFT Mobile to have SV start the scenario so that you can use it to test your application.

    Then, perform steps on your application that require this scenario for testing.

    svStartScenario SvStartScenario

    Stop the scenario.

    When you no longer need the scenario to simulate the service's behavior for your test, stop the scenario.

    svStopScenario SvStopScenario

    You can also see .NET and Java code samples for using service virtualization.

Back to top

Check device vitals

UFT Developer's mobile SDK includes an API for checking a device's CPU and memory usage. The information retrieved is an accumulation of the vitals from the moment the device was locked until it has been released.

To check device vitals:

  1. When locking a device, specify the device vitals that you want to collect during this session.

  2. Retrieve the collected vitals for the locked device by calling the getVitals method.

    The returned value of this method, is a string in the following format:

    <requestedVitalName1> <value> <timestamp>

    <requestedVitalName2> <value> <timestamp>

    <requestedVitalName3> <value> <timestamp>

    <requestedVitalName1> <value> <timestamp>

    <requestedVitalName2> <value> <timestamp>

    <requestedVitalName3> <value> <timestamp>

  3. View the accumulated data for the device vitals in the UFT Developer run report:

    • View a graphical representation of the data collected over time in the System Monitor tab.

    • Hover over an area in the graph to see the device vitals relevant to that point in time.

For more details, see the SDK references:

  Java SDK .NET SDK JavaScript SDK

Methods for locking a device and specifying device vitals to collect

lockDevice

LockDevice

lockDeviceWithOptions

Example of collecting accumulated device vitals

Java example .NET example JavaScript example

Back to top

See also:

Got it!
Welcome to the help center for UFT Developer, formerly known as LeanFT. UFT Developer is part of the new Micro Focus UFT family of integrated functional testing solutions.