How to Load Test Mobile Apps.
*Check out this handy dandy video tutorial which shows a step by step how-to setup and run a mobile performance test.
BlazeMeter provides a series of handy options to simulate the work of users with various mobile devices.
As always, we start by creating a test script - we are using Apache JMeter. But, before the script development we need to configure our mobile device, which will be used for test recording. JMeter records all actions using its own proxy. That is why we need to configure our internet connection in a specific way.
Configure Mobile Device
Open JMeter and add the HTTP Proxy Server component to WorkBench. Then in the component settings, set a port to listen (for example 8089). In the configuration settings of the mobile device, configure the proxy to use as seen in the image below. As a proxy hostname, you will need to set the IP address of the computer on whichever JMeter application is open.
So, follow these steps:
1. Run JMeter application on your computer.
2. Add to JMeter’s test plan HTTP Proxy Server component (right-click on WorkBench – Add – Non-test Elements – HTTP Proxy Server), as shown below:
3. In the HTTP Proxy Server component’s global settings, set the port to listen (for example 8089); and click on the Start button to start configured proxy.
5. Under network configuration of your mobile device, set the computer’s IP address as the proxy IP and port that you had set in JMeter.
For Android devices:
a. Go to Options – Wi-Fi, long tap on the current network connection and choose the “Modify Network” popup menu item;
b. Check “Show advanced options” checkbox;
c. Set parameter “Proxy settings” to “Manual”;
d. In the field “Proxy hostname” type the IP of the computer (for example, 10.2.0.89), into the field “Proxy port” our port – 8089;
e. Save changes.
Step a. Step b. Steps c.–e.
Note that Android supports only HTTP proxy. If your application uses an HTTPS connection, then you may use an additional application that performs with HTTPS proxing.
Run Mobile Web Application
Now you can open the web application you want to test and use it as you usually do. For example, we chose an application that streams news. While using the application, you must perform the same actions that are performed by actual users (login, scroll, comment, click varying links, search information, etc.)
As a result, we got full emulation of our application’s connection with its web server. Because we set the mobile connection over JMeter’s proxy, JMeter recorded all network communications of the mobile web application with its server. All actions are recorded to our JMeter test plan. Upon completion of work with the mobile application we can stop the proxy server and configure the mobile network configuration back to normal mode. To stop the JMeter proxy, open HTTP Proxy Server’s options again and press the "Stop" button.
After recording actions from the mobile device and final correction of the load script, we can run load test using BlazeMeter's capabilities.
Create load test and run, analyze results
Log into your BlazeMeter account and use the 'Add Test' link at the top of the main account page. Set up general test settings and upload the necessary script file.
BlazeMeter provides users with the possibility to simulate the use of mobile networks by setting a special group of parameters in the test configuration. On the test configuration page, expand the 'Network Emulation' group and select the network type to emulate or set your own parameters.
After the creation of the new test, we can run it and obtain load testing results of our application.
After the test run, we can see all results and make summary conclusions about the web application’s stability and quality of service in general. BlazeMeter provides us with the graphical analysis of performance.
BlazeMeter can be used to simulate a heavy load on an application to test its strength or to analyze overall performance under different types of load.
Given results are stored on your account and may be used to compare with tests results in future.
As a result, BlazeMeter can emulate high load for mobile web applications without using numerous real mobile devices. Also the service helps us to save our resources instead of using real devices or Android emulators.
Join our Sessions
Listen to the webinar recap 'Load Testing for Mobile Websites and Apps (made easy)'.
Learn all about our new mobile testing features and how to easily and realistically test mobile apps and websites.