Four ways to record app performance test scripts

Source: Internet
Author: User

Hello everyone, recently a lot of people asked me about the app performance testing aspects. has been intended to be published, due to a number of factors dragged to the present, a company let me explain to the Customer app performance test, back to have always felt the need to write down. Well, not much nonsense.

The current version of LoadRunner12 has 4 ways to generate scripts. 650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/74/EC/wKioL1Yu40HjLniHAAFiwcuo0gQ545.jpg "title=" 1284115201.png "alt=" Wkiol1yu40hjlnihaafiwcuo0gq545.jpg "/>

    • Recording and Analyze traffic

    • Analyze Traffic

    • Record Emulator

    • Proxy Recording

The first type: Record and Analyze traffic

set up a WiFi hotspot on your PC, share your network to that hotspot, or use your portable WiFi

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/ED/wKioL1Yu5wKBVZigAAGbK-tmViU648.jpg "title=" 1.png " alt= "Wkiol1yu5wkbvzigaagbk-tmviu648.jpg"/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/ED/wKioL1Yu58SyebcgAAEsPuMiyWI557.jpg "title=" 2.png " alt= "Wkiol1yu58syebcgaaespumiywi557.jpg"/>650) this.width=650; src= http://s3.51cto.com/wyfs02/M02/74/F0/ Wkiom1yu6buwg-59aabcziy3dqo061.jpg "title=" 3.png "alt=" Wkiom1yu6buwg-59aabcziy3dqo061.jpg "/>

after creating the hot spot on the computer, because the author is the iOS system handset, must use the Fiddler agent installs the Do_not_trust_fiddlerroot descriptive file. The installation steps are as follows:

  1 ) Open Span style= "font-family: ' Song body ', simsun;font-size:16px;text-indent:24px;" >decrpt HTTPS tracffic ', select allow remote computers to connect '

) Open Iphone find connected above named test fiddler ip address (e.g. 10.80.0.128 8888

3) Open iPhone Safari, visit 10.80.0.128:8888, point "fiddlerroot certificate The installation

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/ED/wKioL1Yu7BzROZtRAAH3RD0pXj8566.jpg "title=" 1.png " alt= "Wkiol1yu7bzroztraah3rd0pxj8566.jpg"/>650) this.width=650; src= http://s3.51cto.com/wyfs02/M02/74/ED/ Wkiol1yu7f-hdmbkaah3skieqp8405.jpg "title=" 2.png "alt=" Wkiol1yu7f-hdmbkaah3skieqp8405.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/F2/wKiom1YvE6uxvaAYAAB9i7gfNsw469.jpg "title=" 1.png " alt= "Wkiom1yve6uxvaayaab9i7gfnsw469.jpg"/>650) this.width=650; src= http://s3.51cto.com/wyfs02/M01/74/F2/ Wkiom1yve8bdd6z3aacsizduk00580.jpg "title=" 2.png "alt=" wkiom1yve8bdd6z3aacsizduk00580.jpg "/>650) this.width= 650; "Src=" http://s3.51cto.com/wyfs02/M02/74/EF/wKioL1YvFBDAPZ60AACaLXdmqms391.jpg "title=" 3.png "alt=" Wkiol1yvfbdapz60aacalxdmqms391.jpg "/>

1.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/F0/wKioL1YvGO7Bv0lUAAI8OVUaUt0914.jpg "title=" 1.png " alt= "Wkiol1yvgo7bv0luaai8ovuaut0914.jpg"/>

2. Open Wireshark Click Interface List, click Wi-Fi 2 Details View interface,record Network Select the interface name of the wireless Internet Connection 2 650) this.width=650, "src=" http://s3.51cto.com/wyfs02/M02/74/F3/wKiom1YvF1iQxXvvAAK2bCodGQI057.jpg "title=" 1.png "alt= "Wkiom1yvf1iqxxvvaak2bcodgqi057.jpg"/>

3. Start recording, operate the app on a phone that is connected to a WiFi hotspot, stop recording, save the captured Pcap format file, next

4. Client filter fill in the IP address of the phone, complete, LoadRunner automatic analysis generation script

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/F3/wKiom1YvGbmgNBa0AAFii6Vm3IQ485.jpg "title=" 1.png " alt= "Wkiom1yvgbmgnba0aafii6vm3iq485.jpg"/>

The second type: Analyze Traffic

In fact, the second and the first difference is not small, after you create WiFi and download the installation do_not_trust_fiddlerroot descriptive file on the phone , use Wireshark start to grab the package, select the mobile WiFi Hotspot network connection and click Start

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/F0/wKioL1YvHE2QCetSAAFcSb4QRuo595.jpg "title=" 1.png " alt= "Wkiol1yvhe2qcetsaafcsb4qruo595.jpg"/>

Next, just use the app you want to test, grab the package as follows: 650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/74/F3/wKiom1YvHP7BvzxeAAIO0fyqizM683.jpg "title=" 1. PNG "alt=" wkiom1yvhp7bvzxeaaio0fyqizm683.jpg "/>

Save it in the pcap format, where I save it on the desktop. 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M00/74/F0/wKioL1YvHZOTQTwlAAAbiesWM68869.jpg "Title=" 1.png "alt=" wkiol1yvhzotqtwlaaabieswm68869.jpg "/>

then, like the first method, select Test.pcap,client side filter to fill the phone's IP address (such as 192.168.137.139), click Done, LoadRunner automatically analyze the build script.

The third type: Record Emulator

1. After downloading the Android simulator, configure the environment variable, path C:\Users\L\Desktop\android\sdk\platform-tools;

The path depends on your situation, here I unzip the Android emulator in my desktop, where I need to install the JDK and configure the JDK environment variables, if the JDK has been installed and configure environment variables is not necessary

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/F1/wKioL1YvIQnQd7OMAACBmmSNXLY397.jpg "title=" 1.png " alt= "Wkiol1yviqnqd7omaacbmmsnxly397.jpg"/>

2. After you have already run the Android emulator, install the Android app that needs to be tested

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/F1/wKioL1YvIVyQ0CN6AAD7GyGu044080.jpg "title=" 1.png " alt= "Wkiol1yvivyq0cn6aad7gygu044080.jpg"/>

3. Select the Record emulator click Next to select the Android emulator execution file, where the path is C:\users\l\desktop\android\sdk\tools\emulator.exe,command Line Place @lwq (the name of the Android simulator here), working directory is the working directory, you can customize a folder.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/F4/wKiom1YvIcfBGYLKAADC8fnRUzg851.jpg "title=" 1.png " alt= "Wkiom1yvicfbgylkaadc8fnruzg851.jpg"/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/F1/wKioL1YvIjDCT4qaAAEnLp8nPuY611.jpg "title=" 1.png " alt= "Wkiol1yvijdct4qaaaenlp8npuy611.jpg"/>

4. stop recording after operation to generate script

The fourth type: Proxy Recording

after you create WiFi and download and install do_not_trust_fiddlerroot descriptive files on your phone

1. Open LoadRunner virtual User Generator, create a script, select the Mobile application–http/html protocol, click the Record button, select Proxy Recording Click Next, Enter the agent listening port (e.g. 8888) and click Done.

2. Because the author is an Apple phone, so here is the Apple phone example, Android phone same principle. Manually set the HTTP proxy, the server address is the computer IP address, the port is filled with LoadRunner agent listening Port 8888

(Tip: Start loadrunner Recording First, then configure the phone's proxy port)

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/F4/wKiom1YvJFLQaRxSAAGMRcXEQbE416.jpg "title=" 1.png " alt= "Wkiom1yvjflqarxsaagmrcxeqbe416.jpg"/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/F1/wKioL1YvJoyAGPQ_AAIlFBs74oI768.jpg "title=" 1.png " alt= "Wkiol1yvjoyagpq_aailfbs74oi768.jpg"/>w

From the above two pictures can be seen, the first picture is the laptop connection network cable and then open the hotspot share to the Internet connection 2, the second picture is the notebook connection wireless and then open the hotspot share to the network connection 2, If the server address should be the first to set the HTTP proxy manually when the local connection address is 192.168.1.101, if the second is to manually set the HTTP proxy when the server address should be filled with a wireless network connection 2 address 192.168.137.1

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/F2/wKioL1YvLZGwIvBtAAGwwiwjlHk597.jpg "title=" 1.jpg " Width= "height=" 536 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:300px;height:536px; "alt=" Wkiol1yvlzgwivbtaagwwiwjlhk597.jpg "/>

3. then manipulate the APP and end the recording generation script

the fourth Way and web–http/html Agent recording is essentially the same type

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/F1/wKioL1YvKFbwEnb3AAD7mPBRjPo926.jpg "title=" 1.png " alt= "Wkiol1yvkfbwenb3aad7mpbrjpo926.jpg"/>

from the above four ways to see the fourth is the most convenient, the third way I do not recommend. For the first time in 51CTO blog post, I have limited level, if there are errors in the place to welcome everyone to point out.

This article from the "1284115201" blog, reproduced please contact the author!

Four ways to record app performance test 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.