Telerik blogs

Testing with mobile clients is difficult, but it’s an essential part of load testing applications today.  A large and ever-increasing percentage of application traffic comes from mobile devices, and the unique interactions and communication aspects of these devices has to figure into how we understand the load on the application.

Test Studio 2013 R2 lets testers record test scripts on mobile devices and capture that traffic within Test Studio.  Those scripts can be managed like any other Test Studio script, and played back as a part of a load test.  Moreover, you can set the percentages of traffic from individual scripts, so it’s possible to construct a sophisticated load test that incorporates simulated traffic from iOS, Android, Internet Explorer, and Chrome, the latter two on a desktop.

First, you have to configure the remote proxy on your mobile device.  This varies slightly depending on whether the device runs iOS or Android.  Because my mobile devices are Android, I’ll describe that process.  In the Settings menu, tap Wi-Fi, then hold down your network device (my default is NetGear), and select Modify Network from the menu.  Then tap the Show Advanced Options checkbox.  Select Manual Proxy Settings, and enter the IP address and port number (typically 9001) for the Test Studio computer.

Then you create a load test, and in the dialog select Capture Remote Traffic rather than launching a browser.  This will capture all of the traffic from that device, through the Test Studio computer, and to the server.  It goes without saying that you probably want to close as many of the device’s applications as possible, so as not to have extraneous communications.  However, once you’re done and press the Stop Recording button, you have the unique ability to filter out extraneous traffic using the Filter button in the script window.

If there are applications and Web URLs that you don’t want to include as part of the application traffic, either because they go to other sites or they include data that a client normally wouldn’t encounter, and simply deselect those URLs.  You can also fine-tune that down to individual HTTP requests within the script, which can help with a certain level of “what-if” analysis without having to re-record the scripts.  You can add and remove traffic from scripts to help figure out a bottleneck or resource hog.

To load test a mix of traffic from devices and browsers, you record multiple scripts into a single Test Studio project, and select the percentage of traffic you want from each.  When you run it, those are the percentages that each script will run.

Now you can treat that script just like any other load script, and run a load test as you normally would, including setting up and collecting Perform counters on the server, selecting the number and scheduling of virtual users, and running load tests.  The ability to create scripts directly from mobile clients, and filter and run those scripts, enables testers to run tests created with actual mobile clients for examining application load parameters.

If you are interested in getting started with using mobile clients as a part of your load testing strategy, try the new Test Studio 2013 R2.  You can download a 30-day trial at  Happy load testing!

Peter Varhol


About the author

Peter Varhol

Peter Varhol

is an Evangelist for Telerik’s TestStudio. He’s been a software developer and software product manager, technology journalist, and university professor among the many roles in his past, and believes that his best talent is explaining concepts and practices to others. He’s on Twitter at @pvarhol.


Comments are disabled in preview mode.