Set up Network Virtualization integration in UFT Mobile (on-premises)
This section is relevant only for on-premises deployments of UFT Mobile. Before you can perform Network Virtualization testing on your mobile device, you need to configure the UFT Mobile server.
Network Virtualization enables you to impose network impairments and constraints on your testing environment, to improve the accuracy of your application testing on mobile devices.
By integrating Network Virtualization with UFT Mobile, you can expand your mobile testing to test the effects of networks using:
- Testing tools such as TruClient, StormRunner Load, and UFT.
- The UFT Mobile Lab Console to Perform exploratory testing with Network Virtualization.
- Appium scripts. For sample code, see Appium code Android example with NV - Java.
For more information, see Network Virtualization integration (on-premises).
Set up the Network Virtualization integration
Before running your test with a local NV Test Manager server, your UFT Mobile administrator needs to perform the following:
- With an admin role, click Administration in the right of the masthead, and choose the SETTINGS tab. Select the Network Virtualization Integration node.
- Set Enable NV integration to Yes.
- Provide all the information for the communication with the NV Test Manager server. For details, see Network Virtualization integration settings.
- Click Verify and Save and wait for a confirmation that the settings were saved.
- Proceed to Perform exploratory testing with Network Virtualization.
When testing with Network Virtualization, your administrator needs to configure several settings in UFT Mobile to complete the integration. Most of the settings apply only to on-premises Network Virtualization testing.
To configure these settings, expand the Network Virtualization Integration section in UFT Mobile's Administration > SETTINGS.
The following table describes the Network Virtualization Integration settings:
Communication over device
The following guidelines apply to the Network Virtualization Integration settings:
If the UFT Mobile server cannot communicate directly with the NV Test Manager server, enable this setting to instruct UFT Mobile to communicate with NV through a connected device.
UFT Mobile will first attempt to find a device that is not currently running a test. If no idle device is set up for Network Virtualization, UFT Mobile will choose a device running a test.
Note: At least one Android device must be connected. UFT Mobile will send the commands to NV through a connected Android device, even if the actual test runs on an iOS device.
|NV Test Manager server||The IP address or the server FQDN of the NV Test Manager server.|
|NV port||The port through which UFT Mobile communicates with the local NV Test Manager server. This port is set during the installation of NV Test Manager, and its default value is 8182.|
|NV proxy port||
The proxy port as configured in the NV Test Manager server. It is used to send traffic from the mobile devices to the NV Test Manager server. You must configure this port on each mobile device running tests with Network Virtualization. The default value is 8888.
The protocol to use to communicate between UFT Mobile and the NV Test Manager server. Set this value to HTTPS if the NV Test Manager server is configured to use HTTPS communication. When using HTTPS, you must also install the required certificates. For details, see Install a certificate.
|NV authorization token||The NV Test Manager username and password encoded in Base64. For information on how to encode this information, see Encode your credentials .|
|Enable NV integration||
Enables the integration with Network Virtualization. Make sure that all the other settings are configured, and select Yes. Then click Verify and Save to send your settings to the server for verification.
Tip: If you want to save the NV-related settings locally without verification, click Verify and Save before selecting Yes for Enable NV integration. The values are sent to the server for verification only if you save them after enabling the integration.
If you are communicating over a secure channel (HTTPS) with the NV Test Manager server, you will need to install the certificate on the UFT Mobile server machine.
Download the certificate from:
<http/https>://<NV Test Manager address>:<NV Test Manager port (default 8182)>/hpenv.cer
Go to the NV Test Manager server and copy hpenv.cer from the conf folder. By default, in Windows, this folder is C:\Program Files\Micro Focus\NV\conf (in NV 9.14) or C:\Program Files\HPE\NV\conf (in NV 9.13). In Linux, the default folder is opt/nv-<version.build>/conf.
Copy the certificate to a location on the UFT Mobile server machine.
On the UFT Mobile server, open a command line prompt at the following location:Linux
cd Program Files\UFT Mobile Server\jre_ia\bin
Run the importcert command to install the certificate:Linux
keytool -importcert -file "<path>/<certificate_file_name>.cer" -alias shunra -keystore "/opt/UFTMobile/server/Security/keystore/trustStoreHpmc"Windows
keytool -importcert -file "<path>\<certificate_file_name>.cer" -alias shunra -keystore "Program Files\UFT Mobile Server\server\Security\keystore\trustStoreHpmc"
where <path> is the location of the certificate file you saved earlier.
- When prompted to enter a password, enter the keystore's password.
- When prompted to confirm, enter
Verify that the certificate was installed properly:Linux
keytool -list -keystore "/opt/UFTMobile/server/Security/keystore/trustStoreHpmc" -v –alias shunraWindows
keytool -list -keystore "Program Files\UFT Mobile Server\server\Security\keystore\trustStoreHpmc" -v –alias shunra
When prompted to enter a password, enter the keystore's password, that you defined when installing UFT Mobile.
- Run the uploadCertificates script from the server/Security (Linux) or server\Security (Windows) folders. This script adds the certificate information to the database so that the certificate will be available when you restart the server.
- Restart the UFT Mobile server service.
When accessing the NV Test Manager server, NV uses HTTP basic authentication, which requires a username and password encoded with Base64. You can encode the username and password using one of the following methods:
- Obtain the NV username and password from the NV administrator.
Navigate to the following folder:
<Path to your UFT Mobile server installation folder>/server/Security
<Path to your UFT Mobile server installation folder>\server\Security
By default, the path is C:\Program Files\UFT Mobile Server\server\Security.
Run the following command to encode the credentials:
java -jar hp4m-security-jar-with-dependencies.jar nv <NV username> <NV password>
Save the encoded output value. You will use this value as the NV authorization token in UFT Mobile's NV Integration settings.
- Make sure you have an Internet connection.
- Perform an Internet search for Base64 encode and go to one of the offered sites.
- Encode the username and password using the following format:
<NV username>:<NV password>.
- Save the encoded string. You will use it as the NV authorization token in UFT Mobile's NV Integration settings.