Skip to main content

Mobile Web(Http/HTML) Protocol IN Loadrunner


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.

Comments

  1. 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.
    Please send me Mail (pkrishna.lr@gmail.com) It is useful for me.
    Thanks
    Krishna
    7680933364

    ReplyDelete
  2. Hi Krishna,
    I will share the info as soon as possible. Thank you for reading my post

    ReplyDelete
  3. Thanks seema can you please also send me these step by step process for ios7 application performance testing at the umar.ciitronian@gmail.com
    Thanks
    UMAR

    ReplyDelete
  4. Hi Seema,

    Can 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

    ReplyDelete

Post a Comment

Popular posts from this blog

Pacing Calculation in Load runner

                                        Today i will share my understanding on “Pacing”. Usually people take pacing as think time only. I will try to explain both terms first Think time and Pacing, both are a kind of “wait” or “delay” in terms of time but still both differ from each other. Think time: Think Time is the time or delay which user can take between two actions For example, User opens a URL by pressing “Enter” and login page appears but to enter user name or password user is taking some time like copying from other place or remembering it or something like that. This wait or delay we can term as think time in load runner. Think time can be inserted by user in script or captured by tool itself Whereas, Pacing is the delay between two iterations of test. We can give pacing time by using “Runtime Settings” of load runner tool. We can calculate Pacing/Think...

MI Listener in LoadRunner

In a regular LoadRunner load test scenario (not over a firewall), The Controller has direct access to the LoadRunner agents running on remote machines. This enables the Controller to connect directly to those machines. When running Vusers or monitoring applications over a firewall, this direct connection is blocked by the firewall. The connection cannot be established by the Controller, because it does not have permissions to open the firewall. LoadRunner solves this problem by using a communication configuration based on HTTPS or secured TCP/IP. This configuration uses the standard SSL port on the firewall (port 443). The MI Listener is a component that serves as router between the Controller and the LoadRunner agent. When the LoadRunner agent connects to the MI Listener, the MI Listener keeps a listing of the connection to the agent using a symbolic name that the agent passed to it. When the Controller connects to the MI Listener, it communicates to the MI Li...

Configuring Vuser, Controller and Load Agent using MI Listener

          Configuring Vuser, Controller and Load Agent using MI Listener To Configure Vuser, Controller and Load Agent using MI Listener , make sure MI listener is running Running Vusers over a firewall : To set up your system to run Vusers over a firewall Ø   On each load generator machine that will be running over a firewall, configure the LoadRunner agent to communicate with the MI Listener. Ø   Configure the Controller machine to recognize the load generator and MI Listener machines. Configuring LoadRunner Agents over the Firewall Ø   Stop the LoadRunner agent by right-clicking its icon in the system tray and selecting Close. Ø   Run Agent Configuration from Start > Programs > LoadRunner > Advanced Settings, or run \launch_service\bin\AgentConfig.exe. Ø   Select the Enable Firewall Agent check box, and then click Settings. Ø   The Agent Configuration dialog box opens. Ø ...

Performance Testing of Documentum

Before starting details of how to do performance testing on Documentum I will try share a basic of Documentum so you can get an idea why we need a different approach while doing performance testing on it. What is Documentum? Documentum is content management software that provides management of document content and attributes. Documentum product is a three-tier, client-server system built on top of a relational database. Documentum components comprise the following: ·          Content Server - Manage access to the metadata stored in the relational database and the  Content files, usually stored in the file system ·          Webtop/Wdk Server - J2EE-based web application framework Behavior behind the scene: An applet is invoked at the client side when a file within the docbase is accessed and while files are imported into a docbase. Applet/UCF client being client side Java applic...

Run Vugen script using command prompt

We can also run or replay our Vugen script using Dos Command Prompt (CMD) " LoadRunner install dir" \bin\mmdrv.exe -usr "path to .usr file" Note: LoadRunner install dir: Path of directory where Loadrunner has installed Hope this will help you guys. Happy Exploring!!!!

CITRIX Error in Load runner: Failed to get window size, wrong format.

Citrix based Applications are now days very popular. We can perform load testing on Citrix based application using load runner tool also. Quick tips for Citrix applications: 1. You can use "HTTP" and "Citirix" protocol together in load runner. 2. Try to keep windows in full screen mode. Some time while replaying the recorded script can give some error too. one of the error i have encountered was: Error: Failed to get window size, wrong format. Unable to detect client version. Warning: Extension CitrixClientImpl.dll reports error -1 on call to function ExtPerThreadInitialize Error: Vuser failed to initialize extension CitrixClientImpl.dll Resolve the issue: 1. Save the script after recording. 2. Go to Script directory and look for "default.cfg” file 3. Open the file into edit mode 4. Add below mentioned code in file and save it [CITRIX] DesktopColors=32 Colors=True Color (24 bit) Enctyption=128 Bit Window=1024 x 768 ...

Heap Dump : how to generate heap dump

Heap dump is important when it’s come to performance testing. Let’s start with what is heap in an application. Heap: Heap is dynamically collective amount of data /memory in partially binary sorted tree structure. But we need to loop up on heap in term of memory. Heap is part of memory where memory for objects assigned dynamically. Heap dump : Heap Dump is snapshot of memory at certain point which contains below mentioned information: -information of java objects -information of java classes or we can define as A heap dump is a textual or binary representation of the Java heap which is usually written to a file.   Heap dump is always helpful to analyze memory leak or high usage of memory of java application. There are various tools which help us to generate the heap dump. We can also generate heap dump without using tools. What we require is JVM (Java Virtual Machine)on system. There are various vendors for JVM but let’s concentrate on Sun JVM. ...

Software being installed: Cucumber Eclipse Feature 0.0.23.201811220126 Missing requirement: Cucumber Editor 0.0.23.201811220126

Error:    cucumber.eclipse.feature.feature.group 0.0.23.201811220126 While installing cucumber plugin for eclipse, sometimes we faced below mentioned error Error : Cannot complete the install because one or more required items could not be found.   Software being installed: Cucumber Eclipse Feature 0.0.23.201811220126 (cucumber.eclipse.feature.feature.group 0.0.23.201811220126)   Missing requirement: Cucumber Editor 0.0.23.201811220126 (cucumber.eclipse.editor 0.0.23.201811220126) requires 'osgi.bundle; org.eclipse.pde.ui 3.5.0' but it could not be found   Cannot satisfy dependency:     From: Cucumber Eclipse Feature 0.0.23.201811220126 (cucumber.eclipse.feature.feature.group 0.0.23.201811220126)     To: org.eclipse.equinox.p2.iu; cucumber.eclipse.editor [0.0.23.201811220126,0.0.23.201811220126 ] Solution: Clear your eclipse cache with below steps: Open Eclipse and navigate to the ...

Record scripts on mobile applications in LoadRunner

Record scripts on mobile applications in LoadRunner : As LoadRunner 11 in Patch 3, Mobile App (HTTP/HTML) protocol added which can help us to record scripts of mobile apps. There are three recording options in the recording Wizard: 1.Record and Analyze Traffic - Use mobile sniffer agent to capture traffic and then analyze. This allows Vugen to connect to the mobile agent on the server or localhost and carry out the business process for recording. 2. Analyze Traffic - Analyze traffic using existing capture file to generate script. This allows Vugen to scan a pre-captured network traffic (WinPcap) file and generate the code based on the traffic. 3. Record Emulator - Record script using a mobile device emulator. This allows Vugen to record an emulator installed on the Vugen machine. With this option, you need to verify that you are able to bring up the emulator and navigate to a URL outside of Vugen to make sure the emulator settings are correct.