Script development for mobile apps using LoadRunner

Source: Internet
Author: User

The following is selected from the "Xiao Qiang Software Testing Madness Handout" a book

The original plan is not this section, because LoadRunner to the app recording feature support is not too good, although LoadRunner12 has a better support, but the operation is also more cumbersome, in fact, the app backend performance test interface level will be better. However, by a lot of small white friends asked this question, it is really no energy to answer the unified here and everyone to explain it.

The preparatory work that needs to be done in advance is as follows:

• Install the LoadRunner11 and install the patches so that you can support recording for the app.

L INSTALL the WinPcap software on the computer to capture the request.

L installed a hot WiFi software on the computer, tested 160WIFI and 360WIFI can be used normally.

L install Baidu Paste app on the phone, and register an account in advance, then empty all cached data.

After completing the above preparations, let's take a look at the approximate implementation steps of recording the login app:

1) Start LoadRunner, you can find one more of the protocol: Mobile App (http/html), select this protocol and create a new script.

2) Let your phone successfully connected to the above WiFi hotspot (How to connect not said, will not Google).

3) After completing the above steps, click the Record button, select the first option in Figure 2.4, and then click Next.

650) this.width=650; "src=" http://p9.pstatp.com/large/2a440004ac6e4b904142 "alt=" script development "LoadRunner" using style= to complete the mobile app border:0px;margin:10px auto; "/>

Figure 2.4 Recording Type

4) Click "Connect" button in "Configure & Record" and the content shown in 2.5 appears after successful connection. In the "Record Network" section, select the Hotspot WiFi network card that you just installed and started.

650) this.width=650; "src=" http://p1.pstatp.com/large/2c330000d4b10bbf1939 "alt=" script development "LoadRunner" using style= to complete the mobile app border:0px;margin:10px auto; "/>

Figure 2.5 Connection Success

5) Click the "Start Recording" button in Figure 2.4 to start grabbing the packet, as shown in 2.6.

650) this.width=650; "src=" http://p9.pstatp.com/large/2c22000494731d63972b "alt=" script development "LoadRunner" using style= to complete the mobile app border:0px;margin:10px auto; "/>

Figure 2.6 Recording

6) Then you operate on the phone to login to the business of the app, click on the "Stop Recording" button after the operation, you will be prompted to save a file with the suffix pcap, then click "Next".

7) Import the file that you just saved with the suffix pcap, filter the hotspot WiFi ip,2.7 below the phone connection. Finally click the Finish button to see the generated code.

650) this.width=650; "src=" Http://p3.pstatp.com/large/2c2f00025811246de9ae "alt=" script development "LoadRunner" using style= to complete the mobile app border:0px;margin:10px auto; "/>

Figure 2.7 Analysis File

After the operation of the above can be found, or more cumbersome, and the effect of personal feeling in general, so do not recommend that you use. The tool is sometimes a good thing, but we can't rely too much on it, especially the recording function.

Mobile app Testing I personally recommend that interface-level testing is better, scripting methods and common interface testing is not different, it may be necessary to note that some requests to add some special request headers, using the Web_add_header function can be done, similar: web_add_ Header ("PLATFORM", "ios");


This article is from "Xiao Qiang performance test brand product Manager" blog, please be sure to keep this source http://xqtesting.blog.51cto.com/4626073/1942943

Script development for mobile apps using LoadRunner

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.