How to create web scripts against iOS Mobile Applications

iPhones and iPads devices have become, during the last few years, a valuable asset for business and IT infrastructure. Therefore, and according to the growing usage of mobile terminals, increasing there is a need to validate the performance of these devices

To get started, performance scripts need to register the HTTP activity performed by a real user on the device while reproducing every business flow under scope. Due to compatibility issues, LoadRunner’s network traffic recording mechanism can’t be installed on iOS, so LoadRunner offers an easy to implement and use alternative. This post describes some of the solutions that Globetesting offers to solve this problem using LoadRunner.

This post covers proxy recording mode, which is the most reliable option if you are using iOS applications and easliy enables the capture of traffic without having to install or configure any emulator or network packet tracer software.

From version 11.52 of LoadRunner, a new proxy recording mode was provided. This feature implements a new approach for users to record web applications. It doesn’t require installing any client on mobile devices, so it is particularly suitable for recording mobile applications. It can also be used for desktop operating systems on which VuGen can’t be installed, such as Linux, Mac OS, etc.

Here are the general steps to use the new proxy recorder:

1.  In VuGen, create a new script of type “Mobile Application – HTTP/HTML”.
2.  Click the red Start Recording button.  The last of the four options that are displayed, Proxy Recording should be selected: 

3.  On the VuGen machine, it is necessary to configure Internet Explorer Settings to use the company’s proxy setting if available. VuGen uses the default internet proxy setting to access the internet. This step is optional, and is usually only needed when your application under test needs to access the internet and you are connected to a corporate network which requires a proxy to access the internet. 

 4.  The mobile device needs to be configured to use the VuGen Recording Proxy. In this case, on an iOS device, the setting is Settings > Wi-Fi > HTTP Proxy > Manual. The server’s IP needs to be the VuGen machine, and the Port to be the port that VuGen is listening on.

 The following screenshot shows how to configure the proxy setting for an iPhone. Android devices have a similar setting.

 Once you configure the Wi-Fi (WLAN) proxy setting, it will apply to all communication to and from the mobile device, which means that you might record traffic that is not related to your application, such as your email client. This noise can be removed manually after the script is generated, it is important to identify application’s server name or ip, so that clearing all noise will be easy and effective.

Additionally, it is important to remark that, if the web application is using SSL, some extra steps are required to configure a certificate in order to record the application. In order to enable traffic recording, the VuGen recording proxy acts like a man-in-the-middle, it uses its own certificate to set up a secure connection with the mobile device, and also it uses the certificate of the real server to establish a secure connection with the server. In this way, it can decrypt HTTPS traffic. To make the browser work with the VuGen Recording Proxy over a secure connection, you need to either declare a security exception, or install a root certificate.

 5.  With this in mind, and only during recording, proxyroot.cer certificate needs to be downloaded and installed on both Vugen and Mobile devices. They can be accessed via:

 

http://127.0.0.1:8080/proxyroot.cer

 for Vugen’s machine

http://<vugen_ip>:8080/proxyroot.cer for iOS machine

Where 8080 is the port used to open communication between Vugen and iOS machine.

 After completing this, a new recording can be starting by reproducing in the mobile device the business flows in scope normally, the same way a regular web script will be done.

Once generated, the script may be correlated and parameterized also as a regular web script. Injectors to simulate load should not require any additional configuration but making sure that server can be reached by all of them. For reference, the communication schema is shown in the below picture:

¿Conoces Globe Testing?

¡Descubre como mejorar tu software!

One thought on “How to create web scripts against iOS Mobile Applications

  1. sandeep

    Hi Expert,

    sorry for mistake typing

    I’m using load runner 12.5 can you please tell me how to keep proxy from android to load runner 12.5 .It will be easy if you explain with screen shot and for IOS too .Above article is so good it will be great if you help me in that way.

    Thanks and Regards,
    sandy

    Reply

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *