No votes yet.
Please wait...

Mobile software is one of the dynamically developing spheres in all areas: from advertising to the business field.

As recently as 2014, the number of this software in use was the same as a number of used web product on a PC. It means that the relevance of the mobile app testing becomes very important during the new product release.

Further, we will talk about the peculiarities of mobile app load testing namely the process of test scenarios creating.

We will use several kinds of tests – a classic building of HTTP traffic and work with real devices which can make a real workload with the help of a client.

The Traffic Recording Process

A classic scheme of traffic recording is as follows:

  • Choosing the device with the app whose functioning should be simulated;
  • Proxy service configuration whose task will be to record and redirect clients’ requests to the server;
  • Connecting the device to the proxy server;
  • Activity execution in the mobile device system which should be recorded.

We used Findler 4 as an example.

Findler

Findler

The first thing you should do is install the security certificate on your phone. SSL certificate will let you skip and decode the whole HTTPS traffic via Findler.

You need to set the decrypting configurations of the HTTPS traffic and allow the connecting of remote computers. After you have to set manually the proxy connection on the device.

You can get the certificate here: http://ipv4.fiddler:port_number/, and download it in the browser.

Work on Script Creating

Open the app and do all the necessary things for the future script. As soon as the test plan is created you should correlate the parameters and check if the script you created is executed correctly.

At this stage, the process is maximally similar to the classic script debugging.

If the request (mostly POST with the files uploading) returns with an error, you can recapture it with another software (for example, at first you have used Findler, then you crossed over to jMeter) and compare if there’s a difference.

An Example of the Load Tests in Practical Terms

Let’s take, for example, Gloopt. It is a special service for sharing videos lasting less than 1 minute with your friends.

During the test plan creating with the help of connected plug-ins, it will be better to save all the Findler sessions because not every header can be transferred correctly.
Message passing process between the client software and the server is going in such a way:

  • At first, you have to request the file data (you will know its size from the response);
  • Then the program requests any part of the file, for example, from zero. It looks like this: «Content-range: bytes equals = 0-», and server returns particular part: «Content-range: bytes equals = 0-37895».

There can be two ways to upload the video into the app: to record it with your phone or you can add the one made before. In the first case, it is saved in the system anyway. It means that these both options are similar in terms of load testing.

So, in order to upload the video, we needed to delete Content-Type from the header, write MIME Type in the sending file, set the “Use multipart/form data for POST” and “Browser-compatible headers” in the checkboxes.

Another Way to Record the Traffic in the Android System

If you test the app on Android OS, there’re other ways to record its traffic. In this case, you can use the popular tool Packet Capture. You don’t need root access for it; this app can decrypt HTTPS traffic and fully automate the certificate creating for the process of such traffic decoding.

Packet Capture

Packet Capture

In order to start recording the traffic, you need to allow the app to install the certificate and begin recording relying on the graphical program interface. Then you can go back to the tested app and perform the necessary activity while the recording will be processed in the background.

Once the recording is complete, you can switch back to the Packet Capture and analyze the recorded requests, as well as responses to them. The main screen will display all recordings session. If you want to see requests, you need to select the necessary session.

A complete list of current connections of all applications that access the Internet will be instantly displayed. If you switch to the desired application, you can see the provided traffic.
With the help of special functionality, you can decrypt it. Also, you have an opportunity to save separate connections. But, unfortunately, there is no batch processing, which means that it is impossible to save the entire session or all current requests from the application.

Conclusion

JMeter helps to intercept mobile program traffic and turn it into a test script. All the following steps are identical when executing load testing of web applications – data correlation, editing test data, test launch, and so on.

That is, the performance of mobile app load testing is similar to the processes that work with traditional web products.

Leave A Comment