0% found this document useful (0 votes)
3K views

PerformanceTesting MobileLoad JMeter

This document discusses using JMeter to perform load testing on web applications from mobile devices. It explains that mobile usage is increasing and it is important to test performance for mobile users. It provides steps to create a JMeter test plan that generates load from both desktop and mobile devices by modifying the User-Agent header to specify the device. The test plan records a homepage request, creates thread groups to split load between desktop and mobile, and modifies the mobile User-Agent string to emulate different devices. Running the test allows validating response times for both types of clients.

Uploaded by

ssujesh
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3K views

PerformanceTesting MobileLoad JMeter

This document discusses using JMeter to perform load testing on web applications from mobile devices. It explains that mobile usage is increasing and it is important to test performance for mobile users. It provides steps to create a JMeter test plan that generates load from both desktop and mobile devices by modifying the User-Agent header to specify the device. The test plan records a homepage request, creates thread groups to split load between desktop and mobile, and modifies the mobile User-Agent string to emulate different devices. Running the test allows validating response times for both types of clients.

Uploaded by

ssujesh
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Generating mobile load for web

application performance testing


with JMeter
~By Sujatha
Performance Testing
Web application performance testing mainly involves generating load on the target web application and
measure response time & other characteristic that determines the system performance.

For a performance testing to be highly effective, it needs to reflect real-world scenario. To achieve this
user think time, mixture of different scenarios in right proportion, bandwidth throttling, etc are
considered during performance testing.

Mobile – Web access device


Now the world of wireless technology enables us with internet on the go. So we have the option of
accessing the web from anywhere and through any device. Gartner predicts that by 2013, mobile phones
will overtake PCs as the most common Web access device worldwide. This new trend has brought in a
change how the web applications are designed and served to the end user.

Ideally, web pages are served in standard way to the users viewing from desktop and the lighter version of
the normal page is served to the users viewing from handheld / mobile devices, so as to fit in to their
display and bandwidth connection.

So with increasing mobile users it becomes absolutely important to give necessary consideration
performance testing for mobile web.

Diffentating mobile users


User from the desktop and user from the mobile hit the same url, but how does a web server differentiate
request. HTTP header comes into action here and plays an important role in differentiating the mobile
user from a desktop user

Below given are few commonly used HTTP header fields


• Accept-Encoding
• Accept-Language
• User-Agent
• Referrer
• Authorization
• Pragma

In the above HTTP header field list “User-Agent” plays an important role in identifying the software
program and device from which the HTTP request was originated.

Typically for HTTP request from a desktop user the “User-Agent” value would look like
• Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.24

On the other hand for mobile or handheld devices users “User-Agent” might be like
• SAMSUNG-SGH-E250/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0
(compatible; Googlebot-Mobile/2.1;
• BlackBerry8350i/4.6.1.204 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/103
• LG-GS500/V100 Obigo/WAP2.0 Profile/MIDP-2.1 Configuration/CLDC-1.1
• Nokia2720a-2b/2.0 (08.64) Profile/MIDP-2.1 Configuration/CLDC-1.1
• Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4
Mobile/7B367 Safari/531.21.10
• Mozilla/5.0 (Linux; U; Android 2.2; en-us; SGH-T849 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0
Mobile Safari/533.1

Using JMeter to generate Mobile Load


JMeter is a popular open-source performance testing tool built on Java. It supports several protocols and
technologies. In nutshell, it is a simple and reliable tool to generate heavy loads.

JMeter can be used to generate mobile traffic to web application. Here are the simple steps to create a
test plan for a website hit by 10 users where 50% of the user access from desktop and 50% from mobile
device.

Step 1: Record the action


Using HTTP proxy record the steps involved, for example just get the home page of the web site.
Important - make sure that Capture HTTP Header is checked while recording.
It should look like something as in figure 1

Figure 1

Step 2: Create the script


Now create a thread group with 10 users
Add two Throughput controllers with each 50% of execution (to split the load between desktop and
mobile users)
Copy the recorded HTTP request sampler along with HTTP Header Manager under both Throughput
controllers as shown in figure 2
Figure 2

Step 3: Modify User-Agent value


Leave the HTTP Header Manager for the desktop user unaltered
Modify the HTTP Header Manager for mobile user; replace the User-Agent value with a value that will
reflect the user-agent value from required mobile device.
For quick reference user-agent value for different device can be got from whatheaders.com

Figure 3

Step 4: Execute and Validate


Now the simple test has been created, just add listeners to view the results and execute to see JMeter
hitting the web server as both desktop and mobile user.
Alternatively web servers log can be monitored to validate the hits from web portal and mobile portal.

Reference
http://www.gartner.com/it/page.jsp?id=1278413
http://ifonlyblog.wordpress.com/2010/01/14/gartners-mobile-predictions/
http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html
http://whatheaders.com/data/

You might also like