+1 404-214-5804
Enterprise Mobility Blog, Mobile App Testing

Performance Testing with deviceConnect: LoadRunner and Trust


Last updated July 29, 2016.

One of the enhancement requests we frequently get is for load testing – specifically to enable HP’s LoadRunner to use Mobile Labs’ private mobile device cloud, deviceConnect™. It’s an easy request to answer because Mobile Labs’ Trust™ makes it possible to include real devices in LoadRunner scenarios. In this short note, we will show how it’s done.

HP’s LoadRunner is a load simulator that allows engineers to record web traffic or to write scripts that create server loads by creating virtual users. A Mobile Labs’ Trust script running on a deviceConnect device can be one of those virtual users, giving real device transaction times.

The above video shows a LoadRunner scenario graphing transaction times on an Apple iPhone 5S. Response time experienced by the app remains fairly consistent at around 5.5 -6 seconds, a great result. The transaction monitors the time it takes to log in, set up, and execute an inventory search.

Each time that LoadRunner gathers transaction data from the iPhone 5S, a Trust/UFT script uses Mobile Labs’ DevOps scripting language to obtain a device, launch the mobile app, and connect to the device, an example of hands-off test case automation. Once the app is up and ready to perform the test transaction, we initiate a measurement period, perform the script actions (login, search, logout), and then terminate the measurement period. The script then releases the device and closes the connection.

How hard was it to include this transaction in the LoadRunner scenario? When we created the scenario, we browsed to the Trust/UFT script, added it to the list of known scripts, and included it in the scenario all with the “New Scenario” dialog box.


AddScriptThe script is called “ForLoadRunner.” There are a couple of interesting features about the script. The first is the way we use deviceConnectCLI to launch the app, retain a device, and connect to the viewer:


SystemUtil.Run “MobileLabs.DeviceConnect.Cli.exe”,

strConnectParam ,



The variable strConnectParam contains a deviceConnectCLI command that we construct from variables that were set from a data sheet: mike@ml.sys abcdef12 -d “5SiPhone” -scale 50 -r “PhoneLookup”

The command gives the address of deviceConnect, the name of the device, the app name, and the credentials of the user.

Second, we surround the section of the script that we want to measure with Trust/UFT transaction markers. LoadRunner uses these markers to learn the results of running the script. We were careful not to include time needed to connect, disconnect, or launch the app.

We knew the app was ready by performing an Exist() method on the root object :


Then we started our measurement:


The script then logs in to the app, sets up a search, and performs the search. Once the search is complete, we capture the end of the transaction:


That’s all there is to it. The video shows the transaction being measured repeatedly during the LoadRunner scenario and shows the correlation between the back-end load and the response time received on a real device. To run this scenario, you’ll need deviceConnect with automation, UFT, and LoadRunner with a license for GUI testing. For more information, you can check out an HP blog post here.

Want to learn more? Check out our latest posts!

Don’t forget to download our eBook on Amazon, to stay ahead of the curve in 2017!

Michael Ryan

Michael Ryan serves as Mobile Labs’ chief technology officer. In this role, Ryan provides the technological vision and drives Mobile Labs Trust’s product road map. Ryan has more than 35 years of experience in leading software development teams that design and build robust and market-leading solutions for large-scale enterprise customers among Fortune 1000 companies. Most recently, Ryan was with Fundamental Software where he worked on large-scale systems CPU emulation architecture, design, and implementation. Prior to Fundamental Software, Ryan was director of development, Sr. VP of R&D, and finally, Chief Technical Officer for CASE tool vendor KnowledgeWare, Inc. Ryan served as senior staff systems engineer, field manager, and regional technical support manager for mainframe manufacturer Amdahl Corporation.

More Posts - Website

Leave a Reply

You must be logged in to post a comment.

Why Mobile Labs?

Mobile Labs provides enterprise-grade, next generation mobile application testing tools. With a focus on security, agility and affordability, Mobile Labs delivers solutions to help you deliver quality mobile apps for Android, iOS and Windows platforms while also helping manage mobile devices in a private, secure cloud.

Contact Mobile Labs

3423 Piedmont Road NE
Suite 465
Atlanta, GA 30305
+1 404-214-5804
twitter  facebook linkedin google-plus SlideShare