Loadrunner11 a variety of ways to record mobile app scripts

Source: Internet
Author: User
Tags hp loadrunner

In general, there are three ways to record phone scripts via LR:
1) through the proxy mode recording, to ensure that the mobile phone computer in the same network segment;
2) Install mobile Recorder on the phone by grasping the packet recording;
3) recording via Android simulator, install the Android emulator emulator (Android SDK) locally

First, by proxy mode recording

Http://jingyan.baidu.com/article/359911f566da0d57fe0306d0.html

When Lr11 is cracked version (does not include proxy Recorder agent recording function, can not be recorded using the method above)

Mode 1:web (http/html) protocol (this method is recommended)

1. Description

At present, the function of mobile phone app is becoming richer and more and more demand for performance test of mobile phone application function. Company compared stingy did not pay to buy loadrunner, poor our work has been used in the cracked version, no Loadrunner11.52 above version, can not enjoy the convenience of recording mobile phones. You can only use your own online to gather some methods, using Loadruner11.0 to achieve recording phone application script method.

The following are two types of laptops and desktops that describe how to record mobile apps using LoadRunner.

1.1 Principles of recording

The principle of mobile app script recording (informal, personal understanding only): need to ensure that the mobile phone terminal and computer in the company's same wireless network, mobile phone terminal can be sent through the agent request information through the computer to forward.

1.2 Essential software and equipment

1. The address of the Loadrunner11.0,wplus_init_wsock.exe file, such as:

C:\Program Files (x86) \hp\loadrunner\bin\wplus_init_wsock.exe

2. Public WiFi or Wi-Fi using your computer (laptop as a hotspot or desktop using portable WiFi as hot spot)

3. Laptop or desktop with wireless Internet card (desktop can use portable WiFi as a wireless card)

4. Android or iphone

5. The server address that needs to be tested (I'm actually testing the app server address of the company's internal environment, and here I'm going directly to the CSDN, which I've accessed directly from my browser.) )

such as: Www.csdn.NET

2, Notebook 2.1 notebook settings

1. Laptops need to be connected to public WiFi such as Office-adviser

2. Get the local connection IP

Network connection has wireless network IP, please ignore, need to use local LP, as follows

Settings for 2.2 LoadRunner

1. Select Protocol Web (http/html) when recording:

2. Configuration at the start of recording:

Where program ToRecord selects the address of the Wplus_init_wsock.exe file previously obtained, such as:

C:\Program Files (x86) \hp\loadrunner\bin\wplus_init_wsock.exe

3. Settings for recording options:

A. Capture level sockets level data

B. New Entry Configuration

Description: Taregt server is the address that needs to be recorded, port is set to 80

Traffic Forwarding for proxy forwarding IP, need to be consistent with the phone side settings, set to the local non-conflicting port, such as 2008

4. Save after configuration is complete

2.3 Phone-side settings

Phone-Side settings:

1. Connect on public WiFi such as Office-adviser

2. Set up the WiFi agent as follows:

Where IP is the notebook IP, the proxy port is set to LoadRunner for the agent to the originating number:

2.4 Start recording scripts with LR

1. Click OK on the start recording page to start recording:

In the mobile app page to operate, you can see the following content, you need to record which page operation corresponding function can be:

Like, La La La, said the record was successful ~ ~ ~

The following is a successful recording using the company's internal app environment address:

Example of a failed situation, possibly because the agent is not set:

(Due to company intranet restrictions, I cannot access the CSDN address on my phone.) )

2. As shown below, you can see that the code program that is configured in the recording selection is also running, and closing it after recording is complete.

That's it:

3. Desktop

Desktop basic steps like a notebook, just need to have a wireless card (in fact, as long as the phone and the computer in a network segment can be), here is how to use the "portable WiFi" artifact to complete this work ~

1. Buy a portable WiFi on the internet, I bought a small degree of WiFi from Baidu. (The tragedy is that its heart is millet ...) Use the Xiaomi driver to use, I do not know why).

2. You can use it on the plug.

3. Connect to public WiFi office-adviser using network card mode

4. Appendix 4.1 Reference Web page List

1. Using LoadRunner proxy mode, recording mobile app script (Loadrunner12 including proxy Recorder agent recording function)

Http://jingyan.baidu.com/article/359911f566da0d57fe0306d0.html

2. The website corresponding to 1 has the explanation of HP official website:

http://h30499.www3.hp.com/t5/HP-LoadRunner-and-Performance/ recording-http-traffic-on-ios-devices-with-hp-loadrunner/ba-p/6582844#. Vchcevncfln

According to the official website of the instructions, because the proxy Recorder agent recording function from the Loadruner 11.52 version only, we are currently using a cracked version of 11.0, temporarily do not support this feature

Mode 2:mobile App (http/html) protocol

To use LOADRUNNER11 to record phone scripts, you need to first set up a test environment:
? A LoadRunner11 that can be used normally;
? Install a LR11 patch pack for mobile phone recording;
? The network on the PC side and the mobile phone is in the same network segment.
In particular, the computer needs to be able to provide hot spots (for mobile phone connections), if the desktop computer does not provide hot spots, then you can use the portable WiFi. Laptops can be used to provide hot spots by installing 360 free WiFi.
"Test environment Preparation"
First step: Install LR11
The second step: Install LR11 recording phone script patch package, Qfelr11patch4.msp, download good after, directly click Install, no special request.
Step three: If you see the mobile App (http/html) on the new script page, the patch pack is installed successfully.

"Test Demo"
First step: Create a script for the Mobile App (http/html) protocol;
Second step: Click, select the recording mode: select "Record and Analyze", such as the first one, click "Next";

Note: Choose 3Recording Wizard here, you can use the method of Android simulator to record, see method three


The third step: the Host URL to fill in "http://localhost", Port is a port number, you need to use the current not occupied port number, click "Connect". PS: You can use the command line "netstat" to view the unoccupied ports.

Fourth step: Select the Record network, you can see the record network has multiple, according to each computer, need to choose different, can only be recorded by each to select the corresponding, my computer is a third.

The fifth step: Select the record into,vuser_init\action\vuser_end three select one, the general choice Action, depending on the specific circumstances.
The sixth step: computer release hot spots, to ensure that the phone is connected to the computer hotspot, and only to this mobile phone connection this hotspot!!
Seventh step: After clicking "Start Recording", the status of recording changes to stop recording status, you can start the mobile phone operation.
Eighth step: After the mobile phone operation to record, click "Stop Recording", then the computer will pop up a crawl of a few packets, save it.

Nineth Step: Click "Next", Capture location Select just saved pcap file, IP host to fill in the phone at this time the IP address, this needs to be viewed in the phone, and ensure that the correct!

Tenth step: Click "Done", this will automatically generate the LR script, if the recorded script is empty, it may be the record network selection is wrong, go back to step fourth, select another network until the recording script is not empty!

Second, through the capture package recording

Preparation tools: HP LoadRunner Mobile recorder, fiddler, lr11.04 version, LR11 version does not support mobile phone recording, if it is 11 version to install patches, patches are found on the Internet.

    1. Mobile phone installs HP LoadRunner mobile recorder, PC installation Fiddler tool.

    2. Mobile WiFi and computer Wi-Fi is the same network segment, mobile phone set up with the agent of the Internet, but the introduction of fiddler tools, or I set up after, without the help of this tool, I set up after the mobile WiFi can not be online. It may be that my computer's port is not open, I do not know how to open the correct.

      Download Fiddler tool, I use the version is this V4.6.0.2, open fiddler, Toolbars Tools-fiddler options, tab connections, Port fill 8888, tick allow remote computers To connect

    3. Open Mobile WiFi, modify WiFi network, agent player, Proxy server hostname fill in the computer IP, Proxy server port fill 8888. Save, then your mobile WiFi can be online.

    4. Open fiddler, open the HP LoadRunner Mobile recorder on the phone, click Start Recorder, start recording, click Stop Recorder after recording, export the recording file, send it by mail, because I failed to send with QQ, I don't know what the reason is.

    5. Open LR, select Protocol mobile app, record mode select Analyze traffic, next

    6. There must be a lot of recorded scripts, you can delete irrelevant scripts, and the rest is debug scripts run smoothly.

Third, through the Android simulator recording

First, the premise:
The premise of this record is to require LR11 to install mobile protocol patches and to crack again, the following methods are attached:
1) Install LR11;
2) Install Patch: Lr_app patch and Crack LR;:HTTP://PAN.BAIDU.COM/S/1SJWWLBV again (the version number should be 11.04 after installation)
After installation, you can see that mobile HTTP is already included in the Protocol;

Second, recording mode

In general, there are three ways to record phone scripts via LR:
1) recording via Android simulator;
2) recording by grasping the package;
3) recording by proxy mode;
(a) recording via Android simulator 1) first install the Android virtual machine via Eclipse (this will not be mentioned, do not know children's shoes please Baidu!) )

Here's how to install the app from a virtual machine:
1.platform-tools directory under the new folder newapk, put the downloaded apk file, the file is the APK file to be installed.
2. Execute the console command to install. Click start → run, enter cmd, and open the cmd window. Switch to D-drive, enter D:, and then click Enter to switch to D-Drive,
Enter the CD and locate the Platform-tools file address, which is the Adb.exe file path. (Can be found by file search Adb.exe or platform-tools), paste it in the console.



3. Execute the installation file command: The command is: adb install APK file path and address as shown:


2) Open LR, select Mobile App protocol, click Create


3) Click the Start Record button and select the third method


4.Emulator to emulator.exe the path to the tools directory in the simulator;
command line write @ Emulator name, such as: @Galaxy
Working no need to say, fill in the File save path
Click Done to start recording!

PS: This method is based on the sent network data analysis to generate the script

Just now try again, successful recording, is the computer equivalent card. Attached!

Loadrunner11 a variety of ways to record mobile app scripts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.