Tunnel mode: Record a mobile application

This tutorial describes how to create a scenario for the mobile Dropbox© application.

Dropbox is a free online service that lets people bring their photos, documents, and videos anywhere and share them easily. Among many platforms, the application has been developed as a native application for iPhone smartphones.

The tutorial story line guides you through the recording process of the Dropbox application where you:

  • connect Dropbox, and

  • access your Dropbox public folder.

Understand the context

A native application is software written for mobile devices. It is specifically designed to run on a device operating system and machine firmware, and typically needs to be adapted for different devices.

Organizations develop native applications to best match the mobile limitations. Native applications offer better design, and free themselves from the constraints of mobile browsers. Native applications are dedicated client programs which must be downloaded, typically from a store. They are developed to run specifically on one of more mobile operating systems: iOS, Android, Blackberry OS, or Windows Phone. Although operating systems have few consequences on the performance of native applications, they may prove an issue when recording scenarios and replaying tests.

In order to catch the transactions between the mobile device and the Dropbox servers, NeoLoad fakes the real servers from the mobile device. When recording in tunnel mode, the device interacts with the NeoLoad recorder, while NeoLoad replays directly the device requests to the Dropbox servers and forward the queries to the device. The communication between the mobile device and the server is recorded through the NeoLoad Tunnel function which makes it possible to launch the NeoLoad Recorder without using the NeoLoad proxy. On one side, the Tunnel simulates the web server for the mobile device, and on the other side, it processes the requests and responses with the web server. The Recorder catches the transactions to build the scenario. NeoLoad allows the filtering of the recording to skip or include some requests in order to get an accurate scenario.

Note: You can use the tunnel mode only when you have installed NeoLoad 9.0 on a Windows Operating system.

Dropbox is a secured application where you have to log in to transfer, store and retrieve your data. With a secure connection, NeoLoad has to decipher the traffic flowing between the two entities in order to analyze its content. Each time a communication is sent, NeoLoad decodes the incoming data, analyzes it, and re-ciphers it before sending it out again. This process requires the use of certificates.

Prepare for the recording

Before recording a secured application like Dropbox, you need to install the NeoLoad root certificate on the iPhone. Because Dropbox uses a secured connection (HTTPS) to connect to the data servers, your iPhone device sees the NeoLoad Tunnel as a man-in-the-middle attack and refuses the connection. You need to authorize the connection with the Tunnel to be able to record the traffic. You have to import the NeoLoad root certificate in your iPhone. The root certificate is created when NeoLoad is first launched and is named DO_NOT_TRUST_NeoLoadRoot.cer. It can be found in the configuration sub-directory of the user profile directory.

In Windows, this configuration directory is %AppData%\Neotys\NeoLoad\v9.0\conf.

From your desktop email box, you just need to send yourself an email with the NeoLoad certificate in attachment.

To do so, follow these steps:

  1. On your iPhone, open your iPhone mailbox and open the email.

  2. Click on the attachment to open it.

  3. Click Install to save the certificate on your iPhone.

  4. In the Unverified Profile screen, click Install Now.

This installs the NeoLoad certificate on your iPhone.

In NeoLoad, you are able to record the Dropbox secured application.

For more information about certificates, see Secured applications.

Record the application

To record the Dropbox application, you need to start the application twice:

  • You first pre-record the application to define the list of the servers used in Dropbox and the IP address of the Dropbox simulation in NeoLoad.

  • Then, you browse the application to create the true test scenario in NeoLoad.

First, you need to create a new Virtual User for your new record in the Recording dialog box.

In the Name field, you must specify the label for the new Virtual User. In the Record in drop-down list, select the Container in which you want the Dropbox pages to be recorded. To record Dropbox in Tunnel mode, you have to select the Tunnel mode option. In the Client settings group box, clearing the Start client option makes it possible for you to record the Dropbox application directly from your iPhone.

When you click on the OK button, the Tunnel mode recording wizard opens up to help you prepare the recording.

In NeoLoad, click on the Detect servers button to start the discovery function.

The Detecting servers bar gives you the IP address of the NeoLoad Controller. This IP address is necessary to reroute the iPhone requests toward the NeoLoad Controller which then plays the role of the Dropbox server. Without closing the bar, you must modify the IP address of the DNS server of your iPhone:

  1. Write down the IP address of the DNS server of your iPhone to reset it after the recording process.

  2. In the Wifi parameters of your iPhone, switch the IP address of the DNS server with the IP address of the NeoLoad Controller.

  3. Restart your iPhone to save the change.

At that moment, you must start your iPhone and connect it in Wifi to the same network as your NeoLoad Controller. Close every application but Dropbox to have NeoLoad detect your iPhone and the application.

Once your iPhone is ready, you perform every action of your Dropbox scenario to have NeoLoad detect the servers and domains used by the application. Then, you can click on the Stop server detection process button. The Tunnel mode recording wizard is updated with the servers and domains to record.

You can modify this servers list in the Port and SSL columns, and with the Add and Remove buttons.

Then, you can click on the Next button to display the Configuration check screen.

When IP or port issues are raised in this screen, you must correct them before starting the true record of the application. If you change IPs and ports, you can click Back to restart the Configuration check step.

For more information about the Tunnel mode recording wizard, see Record a secured application in tunnel mode.

When you are ready with the record configuration, you can click on the Finish to close the wizard. You then see the Recording of Virtual User bar to start recording your Dropbox scenario.

To make sure the DNS server change on the iPhone is enforced, restart your iPhone. Then, you can start the Dropbox application.

You are going to browse the application and perform every action of your scenario. This automatically creates the record in NeoLoad.

In your scenario, you already have a Dropbox account. Accessing the application with your account makes it possible for your to test how the secured login performs.

Then, you want to check the files available in your Public folder. This sends a request to the Dropbox storage servers.

You can see that you Public folder is empty as replied by the Dropbox servers.

Eventually, you decide to quit the application. You can click on the Stop Recording icon to close the recording bar. The Post-recording Wizard opens up to help you configure the recorded scenario, as documented in Post-recording wizard. When you close the Post-recording Wizard, you can see the scenario components in the Design section of the NeoLoad Controller.

Caution: When the recording is over, you need to reset the original IP address of the DNS server on your iPhone. Restart it to save the change.

You can edit and improve your scenario further, as documented in User Paths before executing load tests on the your application. Testing your application is useful to measure how it performs. You are advised to start with small tests before increasing the load gradually, because your mobile application heavily depends on the bandwidth conditions with crucial effects on how your application server can handle the requests. For more information about playing your tests and analyzing the results, see Runtime supervision and Manage test results.

Note: The Tunnel mode allows you to record any application whether it is a mobile or a desktop application, a secured application or a regular one. For more information, see Record mobile applications and Record an HTTP application in tunnel mode.