[置顶] 第1讲:LR11.5对手机应用服务测试的支持(一)

本文介绍如何通过USB隧道和无线网络两种方式捕获智能手机APP的网络流量,并使用LoadRunner生成测试脚本。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

(android platform )

As we know, with Mobile APP (HTML/HTTP) protocol, Load Runner can analysis * .pcap file and generate scripts automatically.

By share your computer’s internet connection, we can capture the traffic comes from your smart phone. So what we need to do is share your computer’s network and connect you phone to computer.

There are two ways to capture traffic from your phone.

USB tunnel and WLAN

USB tunnel

1.       Install winpcap on your computer, you can download it from http://www.winpcap.org/

2.       Install wireshark on your computer, you can download it from

http://www.wireshark.org/download.html                                 

3.       Install Reverse Tethering on your computer from https://play.google.com/store/apps/details?id=com.littlelan.ReverseTether.Trial&hl=zh_CN

4.       Root your android phone, LBE Security is a good choice. Download from here

https://play.google.com/store/search?q=lbe+%E5%AE%89%E5%85%A8%E5%A4%A7%E5%B8%88&c=apps

 

5.       Install USB tunnel  on your mobile phone, you can download it from here

https://play.google.com/store/search?q=usb+tunnel&c=apps

 

6.       Connect your mobile phone to your computer via USB. And install the right USB driver on your computer , if you did it so , skip to next step.

 

7.       Turn on USB debug mode.

Change your mobile phone settings by   system setting->developer’s option-> turn on USB debug mode.(different phone may different)

 

 

 

 

8.       Turn USB network sharing. Settings->more network sharing-> network sharing->turn on USB network sharing.

 

 

 

 

9.       Run Reverse Tethering on your computer. Click Android tool.exe

 

 

10.   Click Refresh ->select correct dns-> click connect

(Snapshot on your computer)

 

    

      

     

           

Screen on your phone

        


 
 

        

 

11.   Run wireshark on your computer, select correct network adapter and begin capture.

 

 

 


 
 

12.   Stop capture and save the file as * .pcap .  Then import to Load Runner. The load runner will generate corresponding script.

 

 

 

 

Ad Hoc network

1.       Search CMD-> run as administrator

 

 

 

 

2.

C:\Windows\system32>netsh wlan set hostednetwork mode=allow ssid=karsen key=1234

56789

 

 

Mode= allow to turn on ad hoc network

SSID= Service set identifier

Key= network password

 

 

 

 

3.C:\Windows\system32>netsh wlan start hostednetwork

 

 

 

 

You will find a new wireless connection display on your network and sharing center.

Microsoft Virtual WIFI Miniport Adapter.

 

 

 

 

 

 

4. change the regedit value if you can’t see the sharing option on your computer.

If it displayed .you can ignore this step.(if you use company computer, you need this step)

 

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections

Modify NC_ShowSharedAccessUI value as 1.

 

 

 

4. Share your local connection or wireless network connection

 

 

Then turn on your WLAN connection on your phone, you will search a network with SSID karsen.   Change your mobile phone IP address as static

(please fill the right DNS, or you can’t access site)

 

 

5. install winpcap ,wireshark and capture traffic please refer USB tunnel.

 

 

Don’t use soft AP like connectify to share you network. LR can’t generate script in that situation.

  • 大小: 95.8 KB
  • 大小: 270.7 KB
  • 大小: 114.5 KB
  • 大小: 219.4 KB
  • 大小: 226.8 KB
  • 大小: 33.1 KB
  • 大小: 146.7 KB
  • 大小: 213.6 KB
  • 大小: 78.2 KB
  • 大小: 45.2 KB
  • 大小: 54.8 KB
  • 大小: 47.5 KB
  • 大小: 33.8 KB
  • 大小: 14.7 KB
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值