# Mobile Center features in LeanFT tests

This topic describes how to use various Mobile Center features in LeanFT tests.

In this topic:

## 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 LeanFT 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 LeanFT SDKs. For details, see the .NET, Java, and JavaScript SDK references.

Back to top

## Service Virtualization integration (early access)

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

If your Mobile Center is set up to integrate with Service Virtualization (SV), your LeanFT 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 Mobile Center integration with SV, and prepare the service and scenario files that you want to use.

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

2. Set up LeanFT integration with Mobile Center.

   For details, see Connect LeanFT and Mobile Center 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 Mobile Center the service definition. Mobile Center then communicates with SV to upload the service. | svUploadService | SvUploadService
   Upload the scenario to the device. Send Mobile Center the path to the folder that contains the scenario definition files. Mobile Center then communicates with SV to upload the scenario and make it available in this session. | svUploadScenario | SvUploadScenario
   Start the scenario. Instruct Mobile Center 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

LeanFT'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 LeanFT 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:

- Test mobile apps

https://admhelp.microfocus.com LeanFT 8942
Tips to improve your search results...TOC Lean Functional Testing Help Center LeanFT Help Center 14.50 - 14.53 All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version:(Undefined variable: _rscC_Basic_Variables.FloatingTocShow)