Use JMeter for Mobile Performance Testing

What comes to our mind for the very first time when we hear about JMeter? Is it Performance Testing? Or Web App Load Testing? Well, most of us are unaware that JMeter can also be used for performance testing of Android/iOS apps. It’s quite similar to recording scripts like in case of web apps, all we have to do is to configure a proper proxy on mobile devices. So here in this blog post, we would be listing down the process to record a performance test script in JMeter for Android and iOS platforms.

Best Performance Testing Practices For Mobile Apps In 2021

Prerequisites: JMeter version 3.0, Android phone (versions above Jellybean) or iPhone (version 8.0 onwards)

JMeter Configurations

How to Make Use of JMeter tool for API Testing in Mobile App Development?

1.  Launch JMeter -> Navigate to File option ->  Templates -> Select Recording -> Click on Create (So now we have added all the necessary parameters for Recording scripts)

2. Go to HTTPS Test Script Recorder -> Set port to 8080

Now find your IP Address by ifconfig for Linux and ipconfig for Windows. We will load up this IP address on our phone Android/iOS phone to setup proxy.

Mobile side Configurations

iOS proxy configuration:

  • Go to Settings–>Wi-Fi option.
  • Click on your connected network.
  • Select ‘Manual’ option from the HTTP Proxy section.
  • Set ‘Server’ value as your computer’s IP address and ‘Port’ value to 8080 as JMeter configuration. Refer above image to get an idea about this setup.
  • We need appropriate JMeter Certificate and save it to our phone.
  • Install this certificate on your iPhone.

Android proxy configuration:

  • We need appropriate JMeter Certificate and save it to our phone.
  • Download the zip file for the certificate and send the certificate on mail. And install through the mail. Once the certificate is installed phone will ask to apply a lock. And a notification appears showing Network may be monitored.
  • Now click on Wi-fi Settings -> Long press on the Network you are connected to -> Click on Modify Network -> Advanced Settings -> Change Proxy to Manual -> In Proxy Host name enter the IP of your computer -> Set Proxy to 8080 -> click save
  • Now we are set to start recording and running the scripts.
  • Go to Jmeter -> HTTP(S) Test Script Recorder click Start (this would start the recording). Remember that the port  in JMeter Global Settings and Mobile must be the same.
  • Add a Listener -> Add Result Tree to HTTP(S) Test Script Recorder
  • Perform any actions on mobile devices and the user can see the actions getting recorded on JMeter.

How to Use JMeter for Performance & Load Testing

Replay the actions by increasing the load and monitor the performance

In JMeter go to thread groups and alter the number of threads, Ramp up period and Loop count.

  • Thread means the number of active users.
  • Ramp-Up is the amount of time JMeter must take to send threads for execution.
  • Loop Count is used to specify the number of times to execute the Performance Test.

Adding Appropriate Listeners and analyzing the performance on different loads. Listener that we have used here is Response time over time Listener.

These Listeners don’t come by default with JMeter we need to download the jar and put it into JMeter’s lib/ext directory.  Now restarting JMeter shows these Listeners in JMeter’s list of Listeners.

Advantages of using JMeter for mobile performance testing

  • First of all, JMeter is an open source software. So zero investment.
  • It’s very user friendly with a interactive UI
  • It’s easy to learn
  • Every test script results can be best monitored using different Listeners in JMeter
  • By far the easiest though effective way to check the mobile performance




Share on facebook
Share on twitter
Share on pinterest
Share on linkedin
<b><strong>Karan Makan</strong></b>

Karan Makan

Technology Engineer and Entrepreneur. Currently working with International Clients and helping them scale their products through different ventures. With over 8 years of experience and strong background in Internet Product Management, Growth & Business Strategy.

On Key

Related Posts

Hook Up on Tinder

Since dating can be stressful, there is the possibility of humor to try to reduce tensions. In a new study published in the Proceedings of

error: Content is protected !!