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

(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)

 

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

 

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

 

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

 

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

 

 

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

(Snapshot on your computer)

 

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

Screen on your phone

        

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

        

 

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

 

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

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

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

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

 

 

2.

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

56789

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

Mode= allow to turn on ad hoc network

SSID= Service set identifier

Key= network password

 

 

 

 

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

 

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

 

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

Microsoft Virtual WIFI Miniport Adapter.

 

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

 

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.