You can record a typical business process on a mobile device using the TruClient - UFT Mobileintegration.
Create a script and connect to a server
- Make sure you have prepared your system for UFT Mobile integration, as described in Set up environment.
Open an existing TruClient–Native Mobile script or create a new one.In VuGen
In TruClient Standalone
- In the Create a New Script dialog box, under the Single Protocol or Mobile category, select TruClient – Native Mobile and click Create.
- Click Develop Script.
- In the TruClient Launcher, click Native Mobile.
- Select TruClient Browser.
The TruClient window opens. Make sure the UFT Mobile is selected in the bottom of the pane.
Tip: For all the arguments in the browser window, you can use parameters instead of actual values. Use the drop-down box in each argument field to indicate whether the text in the field is an actual value or a parameter . If you indicate a parameter, you define it separately in VuGen. For details, see Enhance scripts.
Expand the top section, Connect to UFT Mobile Server.
Expand the Arguments section, and manually fill in the server information. If you have already entered the server information in the General Settings, it should appear in the fields. If you recently made changes in the TruClient General Settings dialog box, click the Import button to bring those settings into your script. For details on the settings, see TruClient General settings for UFT Mobile.
To specify a timeout for the connection to the server, other than the default value of 30 seconds, expand the Step section and specify a value.
Click the Connect button to establish a connection with the server. A check mark to the left of the section indicates success.
Before recording your actions, you choose a device and one or more apps for your script. The UFT Mobile wizard lets you select all of the items for your configuration flow, from a single window. For details, see the UFT Mobile Wizard.
Choose a workspace.
Expand the Prepare Workspace section and select a workspace.
Open the wizard.
Expand the Select Device section, and click the Mobile Configuration wizard button . This wizard lets you configure the entire test flow. The DEVICE tab opens. If you know your device's ID, you can enter it directly into the Arguments section, without opening the wizard.
Choose a device.
You can select a device based on its capabilities or a specific device by its ID or name. The default selection method is Choose Capabilities.
In the default selection method, Choose Capabilities, select your requirements in the CREATE RULE page.
Tip: To quickly create a rule based on an existing device, click the Fill Capabilities button, visible when you hover over an active device.
(Devices on the Amazon Device Farm can only be selected by Capabilities.)
- To select a specific device, click the Choose Specific Device tab in the left pane and select a device.
If you only plan to test system apps or the Home screen, you do not need to install any apps and you can skip to the next step.
- Click the APPS tab, which is only available after you have selected a device. Select one or more apps. For details, see View, Upload, and Manage Apps.
- If you do not see the app you want to test in the APPS page, click the Upload app card to add it. When you upload an app, UFT Mobile also creates a packaged version of the app with the libraries that are required for testing.
- Click SAVE AND CLOSE.
Fine tune your device settings.
- In the TruClient window, expand the Select device's Arguments node. Review the argument values. From the Source Lab dropdown, you can select your desired location, such as the default UFT Mobile Lab, a hosted device, or an Amazon device farm device. For details, see View and manage devices and AWS Device Farm integration.
- To replace a value with a parameter, click the drop-down arrow to the right of the field and select the Parameter icon . You can create a parameter through VuGen or from the right-click menu item Create new parameter from selection.
- If you are using parameters, click on the Parameter icon to open the Arguments Editor window. Enter values for the parameter, with each value on a separate line.
Fine tune your app settings.
- In the TruClient window, expand the Install Applications section. The selected apps are listed.
Click on each application, and expand its Arguments node. Review the argument values. TruClient distinguishes between apps by their Logical names, so make sure all of your apps have unique names, To change a logical name, click the Rename icon .
We recommend that you use the latest version and latest upload number for your app, to avoid incompatibility with new versions. To use these values, click the Use Default icon in the Version and Upload fields.
- To replace a value with a parameter, click the drop-down arrow to the right of the field and select the Parameter icon . Click on the Parameter icon to open the Arguments Editor window. Enter values for the parameter, with each value on a separate line.
Indicate if you want to use the packaged (instrumented) or non-packaged (default) version of the app. For details about packaged vs. non-packaged apps, see App packaging and signing services.
- To exclude a specific app for this test, click the Enable/Disable during replay icon . This disables its loading during replay and helps conserve resources.
- To delete an app from the list of installed apps, hover over it and select Delete from the right-click menu.
Before launching the test, you specify which app should open at the beginning of the test. This can be the Home screen, a system app such as Calendar or Phone, or a non-system app that you installed in the previous section.
- In the Finalize and launch application section, click the expansion arrow adjacent to Launch Application.
- Click the wizard icon to open the UFT Mobile wizard. In the wizard window, click the TEST OPTIONS tab (only available after you have selected a device and app).
- Indicate what you would like to launch upon the start of the test: the Home screen, an installed app, or a system app. For System or UFT Mobile apps, select an app from the drop-down list.
Indicate how to handle the installed apps: Install, Restart, or Uninstall for the test.
For actual replay, you can specify a different behavior for the first and subsequent iterations. To set your preferences globally, see Set up environment. To set the replay preferences for this test only, see Runtime settings.
Indicate the device metrics that you would like to gather during the test replay. Select Log if you want to generate a device log. To download the log, click the Download Log button in the remote view's control panel, available only during recording. For details, see Device control panel.
Note: You can also select the metrics globally in the TruClient General settings.
- Click SAVE AND CLOSE.
- To review your settings, expand the Launch application's Arguments node, to open the Step editor.
- Click the Save button in the TruClient browser.
To register all of your choices in TruClient, and prepare for a recording, you must send the UFT Mobile configuration to TruClient, using the Execute configuration flow button.
Click the Execute configuration flow button on the TruClient toolbar. A check mark is displayed next to each of the sections as their values are verified. In the right pane, TruClient shows a remote view of your device and launches the app that you selected.
- When you execute this flow, the device is locked on the UFT Mobile server for your use.
- If for some reason, you get disconnected from the server, or if your device reservation has ended, execute the configuration flow again.
Note: If you allocated your devices from an Amazon Device Farm, this command will not be able to register devices and apps. To monitor the integration with AWS, run it in VuGen or from the LoadRunner Controller.
In the TruClient window's Actions tab, click Record.
Tip: To restart or reinstall the app before you start recording, select the relevant option from the menu in the TruClient toolbar. This can be helpful, for example, to reset the app, or if you want to start recording from the app's opening screen.
Interact with the mobile device in the remote access window. As you perform actions, TruClient records the operations, and steps are added to the script.
- In the Device Interactions section:
- Use the Change orientation button to change the orientation of the device.
- Use the Take Screenshot button to download a screenshot of the current screen to your local machine.
- To send text to the device, click the Send text button.
- Expand the Simulations section, and add simulated events such as Simulate incoming call, Simulate incoming SMS, and Simulate sending app to background.
For more information about the available interactions and simulations, see Device control panel.
Note: If the remote access window fails to show the completion of an action on the device, for example, due to a network delay, TruClient still continues to record steps that you perform on the device itself.
- In the Device Interactions section:
When you have finished recording your test, click Stop in the Actions tab.