Today i will share
my learning on performance testing performed on mobile application.
We can use Load
runner tool for mobile based applications.
HP LoadRunner 11.50
has two new protocols for helping to record mobile applications:
·
Mobile Application – HTTP/HTML: recording scripts at the transport level for both
browser-based mobile applications and native mobile applications, that
communicate with their servers over HTTP
·
Mobile TruClient: recording scripts for browser-based mobile
applications through the browser-based user interface. This protocol is
based on Ajax TruClient, using a browser modified to emulate the mobile
browser.
These protocols are
independent of mobile operating systems, so will work on different versions of
iOS, Android, Windows Mobile, WebOs (Palm), Blackberry, etc.
Let’s see the
picture behind the scene:
We can run the performance testing on mobile app using sniffer agent in
two ways:
1.
Using sniffer agent
for remote server
Steps:
o
To
record traffic on a remote server you first must manually install WinPcap.
Ø Install the mobile sniffer agent on your
server, LR 11 Patch 3 installs to folder C:\Program
Files\HP\LoadRunner\mobileRemoteAgent\win32 files mongoose-2.11.exe and
capture.cgi.
Ø Copy an installer of wire shark to that
folder(win32 for windows, LinuxRH3 for linux, Mac for Mac OS)
Ø Zip that win 32(or respective) folder in
to a zip file.
Ø Copy the zip file to a remote folder on
server.
Ø Expand the zip to a folder such as
"C:\RemoteSniffer" in remote server machine.
Ø In a folder on the server's Windows PATH
(such as C:\Windows) a Cmd file to issue these commands:
o
cd
\
o
cd
C:\RemoteSniffer
o
mongoose-3.0.exe
-e errorLog.txt -r "C:\RemoteSniffer" -C ".cgi" -p 47001
o -e errorLog.txt specifies the name of the
error log.
o -C ".cgi" specifies that the
server invokes cgi files such as MobileCGI.cgi in the "cgi-
bin" folder (based on the mobileCGI.conf file controlling it).
o -p 47001(on port where the application is
running) specifies the listening port.
Ø The above invokes the Mongoose server.
Ø We can manually start the agent.
Ø Create the script
·
Click
the Start Record button.
·
Select
the Record and Analyze option
·
Specify
a mobile sniffer agent location and click Connect (Enter the URL where the
mobile sniffer agent resides)
·
Configure
mobile sniffer agent (Specify the record network interface. This is the network
adapter to which you want the mobile sniffer agent to listen)
·
Specify
which section of the script into which you want to load the traffic:
vuser_init, Action, or vuser_end.
·
Select
Start Recording
·
Record
the desired business process.
·
Select
Stop Recording.
·
Vugen
will generate the capture file.
·
Save
capture file on the local machine when you are prompted.
·
Analyze
traffic
·
Enter
or browse to the location of the capture file.
·
Specify
traffic information
·
Indicate
whether you want to analyze server or client side traffic.
Ø Analyzing Traffic:
Ø When you create a script in the Mobile
protocols, we need to specify from which IP addresses we want to analyze
traffic
Ø We can decide to include traffic from the
client side or from the server side, in the script.
Ø The Analyze Traffic option from the
Recording Wizard provides two methods to specify which IP address's traffic to
include in the script VuGen is generating.
Ø Traffic is identified either from the
server side or from the client side.
·
Server
Side (Destination)
·
Client
Side (Source)
·
Filter
Options
Ø We can specify additional IP addresses to
either include or exclude during code generation. This option can be useful
even if you have more than one client, since you can filter the client's IP in
the code generation settings. The advantage is that you can create one PCAP
file and use it to generate several virtual users by changing the code
generation filtering options in the Recording Options > Traffic Analysis
> Traffic Filters. computer
2.
Using sniffer agent
for local host
Steps:
1. To In certain circumstances, capturing
traffic directly on the application severs may not be practical.
2. In such case, you can capture traffic to
your local computer by connecting your mobile device to your local host.
3. To record using a local host, you must
first configure your machine as a hotspot. You can do this, either by ad-hoc or
softApp.
4. Ad-hoc Network
·
Ad-hoc
networks can only be wireless, so you must have a wireless network adapter
installed in your computer to set up or join an ad-hoc network.
·
Open
Connect to a Network by clicking the Start button, and then clicking Connect
to.
·
Click
Set up a connection or network.
·
Click
Set up an ad hoc (computer-to-computer) network, click Next
·
Acknowledge
source and destinations are within 30 feet distance
·
Define
a network name and select any of the authentication options(e.g. select open)
·
Wait
for”network is ready for use” and then close.
5.
SoftApp
·
The
wireless Hosted Network is a new WLAN feature supported on Windows 7 and on
Windows Server 2008 R2 with the Wireless LAN Service installed.
·
The
virtualization of a physical wireless adapter into more than one virtual
wireless adapter sometimes referred to as Virtual Wi-Fi.
·
A
software-based wireless access point (AP) sometimes referred to as a SoftAP
that uses a designated virtual wireless adapter.
6.
In
mobile device (e.g. Android mobile)>>Menu>>settings>>wireless
& networks>>WiFi Settings>>Add WiFi network>>enter above
created network and click save option.
7.
Not
all the devices support ad hoc (e.g. some versions of Android do not support
it).
8.
For
a hotspot to work, you first need to configure your firewall to support it.
9.
The
hotspot may be implemented with NAT. In that case, the address of the mobile
will be identical to the hotspot machine.
10.
Captures
only WiFi not cellular network bandwidth.
11.
Create
the script
·
Click
the Start Record button.
·
Select
the Record and Analyze option
·
Specify
a mobile sniffer agent location and click Connect. Enter the URL where the
mobile sniffer agent resides.(in this case http:\\localhost)
·
Configure
mobile sniffer agent (Specify the record network interface. This is the network
adapter to which you want the mobile sniffer agent to listen)
·
Specify
which section of the script into which you want to load the traffic:
vuser_init, Action, or vuser_end.
·
Select
Start Recording
·
Record
the desired business process.
·
Select
Stop Recording.
·
Vugen
will generate the capture file.
·
Save
capture file on the local machine when you are prompted.
·
Analyze
traffic
·
Enter
or browse to the location of the capture file.
·
Specify
traffic information
·
Indicate
whether you want to analyze server or client side traffic.
Thanks Seema, My requirement is IOS/Android apps performance testing using load runner 11.52 version Can you please send me mail step by step Mobile application (HTTP/HTMP) Recording and Scripting.
ReplyDeletePlease send me Mail (pkrishna.lr@gmail.com) It is useful for me.
Thanks
Krishna
7680933364
Hi Krishna,
ReplyDeleteI will share the info as soon as possible. Thank you for reading my post
Thanks seema can you please also send me these step by step process for ios7 application performance testing at the umar.ciitronian@gmail.com
ReplyDeleteThanks
UMAR
Hi Seema,
ReplyDeleteCan you please share the same information what Krishna Teja has asked. I have the same requirement. My mail id is vinaytiwari11@gmail.com
Regards,
Vinay