`

web test LoadRunner Android / APK / android sdk / IOS / loadrunner 11.5

 
阅读更多

s

现在已经推出11.52,12.0也已经推出。全面支持mobile协议,可以采用模拟器的形式测试

 

如何用Loadrunner测试手机APP,(安卓版本及IOS版本)

http://bbs.51testing.com/thread-1012076-1-1.html

HP_LoadRunner_Mobile_Recorder_1.1.0.apk.zip 

 

方法一:本地安装安卓模拟器,用LR选择模拟器录制方式录制
方法二:手机真机需要root,可以在电脑上下载一键root工具(如卓大师),然后手机和电脑用数据线连接,然后root。
在手机上运行 Mobile Recorder
按 “Start Recording”开始录制
切换到你们的手机客户端,完成正常的操作步骤
切换回Mobile recorder,点 “Stop Recording” 
用email发送抓到的数据包或者把数据文件(扩展名是lrcap)直接copy到 VuGen上
新建mobile http脚本->record->选择”Analyze traffic”->capture file选择上面生成的lrcap文件,指定server的IP和port或者手机的IP->Finish

 

Recording HTTP traffic on iOS devices with HP LoadRunner

http://h30499.www3.hp.com/t5/HP-LoadRunner-and-Performance/Recording-HTTP-traffic-on-iOS-devices-with-HP-LoadRunner/ba-p/6582844#.VbrP-7PvPtT

 

(This post was written by Gennady Gorenshtein from the LoadRunner R&D Team)

 

iOS devices such as iPhones and iPads have become a valuable part of the IT infrastructure, and accordingly, there is a need to validate the performance of these devices as they run applications.  LoadRunner, as the leading performanceload testing tool in the market, is the perfect choice for this validation. To get started, LoadRunner needs to obtain the HTTP activity performed by the device. Because LoadRunner’s network traffic recording mechanism doesn’t run on iOS, we have a way of getting at the HTTP activity. This post describes some of the solutions that LoadRunner offers to solve this problem.

 

LoadRunner Proxy Recorder

Starting from version 11.52, LoadRunner includes a new component called Proxy Recorder. This component is responsible for recording the HTTP activity that takes place on the remote host. In short, the remote host simply sees LoadRunner’s Proxy Recorder as a regular HTTP proxy and routes all the HTTP network activity through it. LoadRunner then captures the remote host’s HTTP traffic and creates a script for the load testing.

 

Since any iOS device can be seen as remote network host, we can use LoadRunner’s Proxy Recorder to capture the device’s HTTP activity.

 

If you haven’t downloaded HP LoadRunner, here is your opportunity to see what it can do for you! Dow...

 

Configuring VuGen

First, set the recording mode to ‘Remote Application via LoadRunner Proxy’ mode in VuGen’s Start Recording dialog:

p1.png

 

The proxy mechanism will be launched when you press the “Start Recording” button. You then need to configure the settings for the device—which may use a wireless connection or a cellular connection. The settings for each connection type are slightly different.

 

Configuring the device’s proxy settings for a wireless connection

Configure the proxy settings on the device by going into the device’s Wi-Fi settings and configuring the network to use a manual HTTP proxy. Set the IP and port to the values in the dialog above (10.0.0.11 and 8888 in the example here):

p2.png

 

From now on, LoadRunner will record any HTTP network activity on the device.

 

As an alternative to using an actual iOS device, LoadRunner can record from the iOS emulator on OS X, using the same settings: LoadRunner Proxy Recording should be started on the Vugen machine, and the emulator’s proxy should be configured to point to Vugen’s IP and proxy port.  You can check out this post for more information about proxy recording in LoadRunner for mobile applications.

 

Configuring the device’s proxy settings for a cellular connection

To record a cellular network connection, create a special APN (Access Point Name) profile and load it onto the device. You can use the iPhone Configuration Utility, available for Windows and OS X, to create the APN. This screenshot shows how to create a profile on OS X:

p3.png

 

Proxy server and Port settings should point to the LoadRunner Proxy IP and port.

 

To load the profile onto the device, it can be loaded through the iPhone Configuration utility, downloaded as a file, or emailed as an attachment.

 

If you need to record SSL traffic, you need to obtain and install the LoadRunner Proxy SSL CA certificate on the device. To obtain the certificate, point your device’s browser to http://lr_proxy_ip:80/proxyroot.cer (note that it is usually a good idea to install the certificate before recording in any case, even if you don’t know for sure that you’re going to use SSL communication, as SSL sessions often start implicitly). After that, save the downloaded certificate and install it on the device:

 p4.png

 

Wireshark recording

Wireshark is a free and open-source packet analyzer. It is used for network troubleshooting, analysis, software and communications protocol development, and education. In promiscuous mode, Wireshark is capable of capturing all traffic that passes through the network interface, regardless whether the traffic is intended for this interface or not. Wi-Fi network activity (called also WLAN) passes through all participating network adapters. In other words, promiscuous mode captures network traffic between all devices connected to the same WLAN.

 

LoadRunner is capable of analyzing of Wireshark capture files and creating LoadRunner scripts from the capture files. You can configure it as follows:

  • Configure your device to run in a wireless network with Wireshark installed on some of the computers on the network.
  • Start Wireshark, choose the wireless interface, and check the ‘Capture packets in promiscuous mode’ checkbox:

p5.jpg

 

Start the Wireshark capture process, generate some HTTP activity on your device, and save the captured activity to a file.

 

You then import the file into LoadRunner and create the script by running VuGen’s Recording Wizard, and selecting ‘Analyze Traffic’:

p6.png

 

Filter the traffic based on the device’s IP and create the script:

p7.png

 

Server side recording

If the HTTP traffic from the iOS device is directed to a single server, and the user has the sufficient permissions on the server, you can record that traffic on the server itself.

 

To record traffic on a remote server, you need to manually install the mobile sniffer agent onto your server by copying the relevant folder from <LR installation directory>\mobileRemoteAgent\ to a location of your choice on your server. The following table lists the supported operating systems and their corresponding file directories:

 recording HTTP 8.png

Once you have copied the folder, you initiate the sniffer from the command line. For example, if you are recording in a Windows environment, the command line string might look something like this:

 

mongoose-2.11.exe -e errorLog.txt -r "C:\Program Files\HP\LoadRunner\mobileRemoteAgent\win32" -c ".cgi" -p 80

 

 

Common command arguments and their descriptions:

recording HTTP 9.PNG

Once the sniffer agent is installed, you manually start the agent, then select ‘Record and Analyze Traffic’ from the Recording Wizard.

p8.png

 

Configure the sniffer agent’s location:

p9.png

 

Generate some HTTP activity on your device, and LoadRunner will generate a script from the activity recorded using the sniffer.

 

Feel free to leave a comment in the box below.

 

Check out this post for more information about mobile performance testing.

 

Thanks to Gennady for providing this article!

 

Download HP LoadRunner for your performance and load testing for free – 50 Virtual users for unlimit....

 

LR通过录制android模拟器来产生脚本--疑问

http://bbs.51testing.com/thread-964387-1-1.html

步骤就是
1:新建LR脚本。协议选择Mobile Application - HTTP/HTML
2:在record里选择第三个:Record Emulator........
3:  选择下一步后,在emulator to record选择模拟器tools目录下的emulator.exe
                    command line 里输入avd虚拟机的名称:用@连接  如@test
     working directory 随便选个路径就行了
4:然后运行,就会自动启动模拟器,不会录制操作,只会根据发送的网络数据分析来产生脚本;
各位录制完了。也研究下怎么增压。。求告知


你可以使用下kylinPET工具,到他们的官网下载www.kylinpet.com,也有技术支持。智能手机录制需要你通过抓包软件把业务(浏览器的HTTP)交互抓下来,手机上抓包可以使用tcpdump(要有权限),也可以在服务器抓包。把抓包文件保存下来就可以通过kylinPET读取抓包文件生成脚本,跟实时录制一样。
抓包时可以设置过滤条件,如port 80,这样抓到的报文就只有业务相关的,还有使用tcpdump时注意抓包时抓包长度要设置为1500

 

end

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics