Recording mobile device traffic for performance testing mobile HP Loadrunner2

上一篇 / 下一篇  2014-05-19 18:03:14 / 个人分类:performance testing

1
en.% 11.22.33.44 # maps en.wiktionary.org to the Loadrunner host

If the firewall is active on the machine, add an exception for MaraDNS, so that the mobile device could access the DNS port (UDP port 53).

Also ensure, that there is an an exception for port 80 (for Loadrunner VuGen).

Test DNS

Start the DNS server via typing run_maradns

Startup logs of the spoofing DNS server

Test the name resoultion with the following command (it should return the IP address of the VuGen host):

1
askmara Aen.wiktionary.org.

Testing the settings of the DNS server using askmara for the hostname en.wiktionary.org

Configure the device to use the custom DNS

Point the device to use the DNS sever you have just set up.
Here is how to accomplish this on devices running Android, iOS (iPhone/iPad) and Windows Mobile.

Configure the recording in VuGen

As the Wiktionary test application uses HTTP protocol, a HTTP/Web script. should be created. In the Start Recording dialog the recorded application will be Internet Explorer, and the opened URL is something easy to identify and remove later from the script, e.g. www.google.com. (For some reason recording does not work if you specify a program that does not network, like notepad.exe or calc.exe, so the good old Internet Explorer is used to fire up recording)

Start recording Internet Explorer, just to fire up Loadrunner

Before starting the recording, in the Recording Options/Port Mapping add a mapping to forward local port 80 towards en.wiktionary.org. First the network capture level is set to “Socket level and WinInet level data”.

Adding Traffic forwarding rule at the Recording Options/Port Mapping dialog in Loadrunner VuGen

Then the traffic forwarding rule is to be created by clicking “New Entry”.

Specify the port forwarding from the local computer (running Loadrunner VuGen) towards the webserver to which the device application is connected to

As it is intended to forward the network traffic arriving to the local 80 port, ensure that you do not have a running webserver on your computer (e.g. make sure to shut down Windows Internet Information Server if it is running). Also check, that your firewall does not block incoming traffic to TCP port 80 (add an exception if necessary)

Start recording network traffic

Start the recording. First, Loadrunner VuGen starts the Internet Explorer and opens the url you specified. This traffic should be ignored and removed from the recorded script.

Check if recording works properly, e.g. by starting a new browser instance on the VuGen machine and opening e.g. http://localhost. The request must be properly forwarded and served as well as recorded by Loadrunner (watch the recording toolbar’s counter rolling)

Finally the execution of the test steps on the device can be started. Ensure that the recording toolbar is indicating captured network traffic. Stop recording auto generate and postprocess the Loadrunner script. the usual way.

Summary

I hope this DNS spoofing technique makes it easier for some of you to performance-script. network traffic of smart devices like iPhone, Android and Windows Mobile with HP Loadrunner 9.5x. This technique can be used if hard device usage can not be avoided.

As you have noticed, far more preparation work is needed in contrast to the hardware emulation solution. If applicable, the usage of emulators and scripting upon interface specification might be preferred.

The nice thing about this technique is that no special software is needed…the next thing I’m going to look at is HP Loadrunner 11 Mobile Testing capabilities … unfortunately there’s no online documentation available to see what are the features of that solution  … So I’ll have to discover it myself : – )


TAG:

 

评分:0

我来说两句

Open Toolbar