As a part of a QA team, we need to perform load tests to see how our system behaves as the popularity grows and more users start connecting to the back‐end servers. After doing some research, we determined that JMeter with Redline13 cloud would perform the load test.
To get started with the load test, the first challenge is to identify the critical business transactions from the end users’ point of view and then to identify the API calls behind-the-scenes against each transaction. There may be multiple API calls made with each business transaction.
Below are a few steps that we followed to complete the load test with the help of the Charles Proxy tool:
The first step is to list all of the scenarios on which you need to perform load tests. All of the critical business transactions need to be identified as per usage. For example, in our hybrid mobille app, we identified the following business scenarios:
To identify API calls behind the scenarios, we need to record the application requests. To do this, we need to do the following:
Below is a detailed outline of each step in identifying API calls.
Set up a proxy
Connect your Device to the Proxy tool
Enable your device to use your workstation as a proxy by going back to your mobile device’s wifi connection settings and entering your workstation’s network IP address (in Charles: Help > Local IP Address) in the proxy server field, including the port number that you saw in Charles (Proxy > Proxy Settings > Port under HTTP Proxy field).
Identify API calls behind the scenarios
How to identify API calls for HTTPS requests
If you mobile application uses HTTPS/SSL to secure traffic from clients, you need to enable the “Capture HTTPS CONNECTs,” Decrypt HTTPS traffic,” and “Ignore server certificate errors” on the HTTPS tab. To enable the SSL proxy in Charles, you need to do the following:
Define the Test Plan in JMeter
After preparing the test plan, execute it with varying numbers of users and then analyze the results with the help of listeners. To add listeners: right click on Test Plan > Lister > Aggregate Report. Use the Aggregate Report to analyze the performance of all of the requests made during the test and create an individual row for each named request in your test.