Mobile Performance Testing | Recording a Scenario with JMeter

This tutorial explains how to configure JMeter and mobile devices to capture mobile application activities for mobile performance testing.

Prerequisites

  • Computer and mobile devices should be connected to the same network.
  • Apache JMeter & Java JDK has to be downloaded and be installed on your computer.
  • Apache JMeter temporary Root CA must be installed. If it is not installed, HTTPS recording cannot work.

Where is Apache JMeter Temporary Root CA Located?

ApacheJMeterTemporaryRootCA is located in the bin file. Certificates have a limited lifetime, around 7 days only, if it is expired you will need to reinstall it. If you can not find this file, When you start JMeter’s HTTP(S) Test Script Recorder, JMeter will generate “ApacheJMeterTemporaryRootCA.crt” automatically.

How to install ApacheJMeterTemporaryRootCA?

  • Attach the certificate to an email and send it to yourself.
  • Open the email on your device and click the certificate.

How to Start Recording with JMeter for Mobile Performance Testing?

Open a new project, set a name, and save as .jmx file.

jmeter mobile performance testing

Step-1:  Configurations

Right-click the WorkBench and add HTTP(S) Test Script Recorder. HTTP(S) Test Script Recorder helps to record a user’s activity for mobile performance testing.

jmeter configurations for mobile performance testing

Global Settings Port value and Device’s port value should be the same.

port settings on jmeter

If your device is iOS Device, set up the following proxy configurations:    

  • Settings —> Wi-Fi —> Your connected network.
  • Choose Manual from the HTTP Proxy section.
  • Add server value, Server = Computer’s IP address.
  • Add Port value , Port = JMeter’s Port value.

ios settings for performance testing

If your device is Android Device, set up the following proxy configurations:

  • Settings —> Wi-Fi —> Your connected network.
  • Show advanced options.
  • Choose Manual from the HTTP Proxy section.
  • Add Proxy host name value, Proxy host name = Computer’s IP address.
  • Add Proxy Port value, Proxy Port = JMeter’s Port value.

dhcp settings for mobile performance testing

Now, configure your device and computer.

Step-2: Let’s Start Recording!

Right-click the SW Test Academy – Mobile Performance Test (Test Plan) and add Thread Group.

Right-click the Thread Group and add Recording Controller.

thread group in jmeter

These elements are sufficient to start a simple test for mobile performance testing. Now, open the HTTP(S) Test Script Recorder and click the Start button.

test script recorder in jmeter

When you click on the Start button, you will see the “Root CA certificate ApacheJMeterTemporaryRootCA created bin directory” dialogue. Just click the OK button and continue.

root CA certificate ApacheJmeter

Start the application and follow the scenario. Now, you can check your recorded requests when clicking the View Result Tree.

view result tree in jmeter

Note: You might receive some other requests than your target app’s requests because JMeter proxies all requests sent.

If you want to learn more about JMeter, please click to go JMeter section.

Thanks.
Hasan Yelaldı

4 thoughts on “Mobile Performance Testing | Recording a Scenario with JMeter”

  1. hi
    I am not able to record the mobile application action using recording in jmeter.could you please guide me how to do mobile apps performance testing using jmeter.
    Thanks in Advance

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.