2 min read time

Test your Apps under real world conditions with HPE UFT & Network Virtualization

by in DevOps Cloud (ADM)

Hewlett Packard Enterprise Network Virtualization (NV) enables you to capture and emulate real-world network conditions. This capability enables you to run functional tests and perform application performance testing, as well as analyze test results to detect and remediate bottlenecks before deployment.

NV empowers you to release high quality apps without performance incidents by accurately testing and optimizing applications for all network performance conditions.

In HPE Unified Functional Testing 12.52, we integrated with HPE Network Virtualization 9.00. This enables you to run your functional tests under real world conditions and ensure that your applications function well under different network profiles.

Check out the available Network Virtualization downloads

 

Prerequisites

Before running a test with a virtualized network condition, you must:

  • Have access to the Network Virtualization Test Manager location from UFT
  • Create the necessary network profiles in NV Test Manager

 

Configuration

To start the integration, first configure UFT to access your NV Test Manager.

In UFT, select: Tools --> Options --> General --> Network Virtualization.

Enter your NV Test Manager location and credentials. Click Test connection to test your connection to the NV test server.

Add any IP addresses you want to exclude from network emulations from UFT to the list of IPs to Exclude.

The addresses in this list are excluded from all NV emulations from UFT.

For example, you may not want to emulate the connection to your Jenkins machine. In this case, add the IP address of your Jenkins machine to the list.

 

Running your GUI tests with an emulated network condition

In order to work with NV inside UFT we introduced a new test object called NV. This object has three methods:

  • StartEmulation
  • StartEmulationExcludeIPs
  • StopEmulation

The StartEmulation method receive the name of the network profile as a parameter from the NV Test Manager.

You can also exclude IP addresses from a specific StartEmulationExcludeIPs step. These IP addresses are excluded only from this specific emulation, in addition to any addresses listed in the IPs to Exclude list in the Options dialog box.

In the example below, my GUI test runs under a network profile named 4G Good.

myEmulation = NV.StartEmulation("4G Good")

Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "username" 
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("password").SetSecure "mysecuredpassword"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-In").Click 5,5

NV.StopEmulation(myEmulation)

To start this emulation, I defined the following new variable:

myEmulation = NV.StartEmulation("4G Good")

I will also use this variable to stop this emulation. You can assign any name you like.

Once the emulation starts, the rest of the GUI test runs as usual.

To stop the emulation, we added the following step at the end of the test:

NV.StopEmulation(myEmulation)

Note: You can run multiple emulations in your tests, but only one at a time. To run another emulation, make sure you first stop the previous emulation.

 

Report

The UFT report displays the following custom step, with the details of the network emulation I defined:

 

Conclusion

By integrating UFT and NV, you can now modify your GUI tests to run under real-world conditions by simply adding the NV object to your tests.

With UFT 12.52 and NV together, you can verify that your applications function well—not only in your testing lab —but also under the real world conditions of your users.

 

Try Unified Functional Testing for yourself!

 

Feel free to leave a comment below if you have any questions on this process.

Labels:

Future of Testing