How to Test Native App Performance using Apache JMeter?

In my previous blog, I have elucidated how to test web application’s performance using JMeter. Here, I would like to share how to test mobile app’s performance in JMeter.

JMeter records mobile application requests on HTTP(S) Script Recorder and it has features to prepare and run our mobile application performance test scripts. All we have to do is to configure JMeter and Mobile device. In JMeter, we can test both iOS and Android native applications.

Steps to Configure JMeter:

  1. Go to apache-jmeter-3.1/bin folder and start the jmeter.bat (Batch) file.
  2. Right click on “Test Plan” > Add > Threads User(s) > Thread Group.
  3. Right click on “Thread Group” > Add > Logic Controller > Recording Controller.
  4. Right click on “Thread Group” > Add > Listeners > View Results in Tree.
  5. Add HTTP(s) Script Recorder to Workbench by selecting Workbench > Add > Non-Test Elements > HTTP(s) Script Recorder option.
  6. Add Port value as 8080 and click “START” button in script recorder. The JMeter proxy will be started on localhost.

Note: If you are testing from behind a firewall/proxy server, you may need to run the jmeter.bat file from a command line mode to use following parameters (If you are working under proxy network in office, use this method.)

Go to jmeter/bin directory and enter this:

jmeter.bat -H <Hostname or ip address> -P <Server port> -N <Non proxy hosts> -u <Username for proxy – If required> -a <Password for proxy – if required>

Example: jmeter.bat -H my.proxy.server -P 9090  -u username -a password -N localhost

Next, we need to configure the mobile device as per the following steps.

Before starting the configuration on your device, you should install “ApacheJmeterTemporaryRootCA.crt” certificate in your mobile/tab device.

Steps to install the certificate:

1. Go to jmeter/bin directory and find the ApacheJmeterTemporaryRootCA.crt file. (If you cannot find the certificate from bin directory, just go to your HTTP(S) script recorder screen in Jmeter and click ‘Start’ button. It will generate new certificate on your bin directory automatically).

2. Attach that file and send an email to yourself.

3. Download from your mail and then install on your device.

After installing successfully, you will see the notification “Network may be mounted” on android device. Here you can verify whether the certificate has been installed. For iOS device, it will show you the “Profile Installed” pop-up and you can see the ‘Verified’ sign. Tap ‘Done’ at the top right corner to complete the installation.

Note: Ensure to check whether the certificate has been expired or not. Certificate will be expired within 7 days from the date of generated. If it has expired, simply re-generate again and use it.

iOS Device Proxy Configuration:

  1. Go to Settings > Wi-Fi option. (Note: Network should be same for both Mobile and Laptop/Desktop).
  2. Click on the Connected network.
  3. Select “Manual” option from HTTP Proxy.
  4. Set ‘Server value as system IP address and Port value to 8080 as per JMeter setup.
  5. Now start the application on the device and its each request will be recorded in JMeter.

 Android Jmeter

Android Device Proxy Configuration:

#1. Go to Settings > Wi-Fi option.

#2. Press and hold on connected network and Click ‘Modify Network’ option.

#3. This will open advanced settings from where we can modify Proxy.

#4. Change the Proxy to Manual.

Apache JMeter

#5. Set Hostname value as system IP address and Port value to 8080 as per JMeter setup.

Android PAC

#6. Click on ‘Save’.

#7. Now start the application on the device and its each request will be recorded in JMeter.

#8. Before running the application, make sure that HTTP(S) script recorder was started in JMeter.

#9. Once the application is started, the actions of the script will be recorded under “Recording Controller.”

#10. Once actions are done in the application, stop the script recording by clicking ‘Stop’ button in HTTP(S) script recorder screen.

#11. Now, expand the “Recording Controller” in JMeter. You can view all the Recorded scripts of whatever actions are done in the applications.

#12. Finally, click the ‘Play’ button. It will run recorded scripts as per your Threads setup.

#13. Click on “View Results in Tree”. Here you will see the result of your script.


Solutions for issues while testing the mobile application:

Here are the solutions for the issues that we have noticed while doing the load test in JMeter.

Issue 1

The application wasn’t getting loaded.


The issue is caused because our system was enabled with the firewall protection in security software. This is restricting network connection when setup with the proxy. We have disabled the firewall protection in antivirus settings.

Issue 2

Internet was not working with Proxy on the mobile device when we configure the mobile device and JMeter.


The reason might be that the system IP address is not configured with JMeter properties which mean the current IP address is not added to the JMeter properties file. We have added remote host IP address to property file as per the following steps.

  1. Open the browser and type IP address and Port number that is mentioned in JMeter to check whether it was configured. If browser shows Connect, then it is working fine otherwise if it is continuously loading, then it was not configured. Then we have to follow the below steps:
  2. Open apache-jmeter folder from the local drive and go to the bin folder.
  3. Open “jmeter (.properties)” file and find “Remote hosts and RMI configuration” section on this file.
  4. Under this section, add the system IP to remote hosts with comma delimited and save the file.
About Alagappan Narayanan

Alagappan Narayanan is an Associate software engineer at Vmoksha Technologies. He is passionate about exploring new automation technologies for mobile and web application testing. He loves reading novels, traveling, and trekking. He has done Master's in Computer Application at Bharathidasan University.

19 comments on “How to Test Native App Performance using Apache JMeter?

  1. Ritesh Bilgaiyan


    I am currently working on Performance Testing of Native app. I tried with proxy, disabled the firewall, installing the ROOT CA certificate but still not recording is happening. But if i tried to record with browser on mobile then scripts will get record on JMeter.
    Can you help me on this issue ?

  2. Poornachandra M R

    I did all settings as show above.
    I’m in office inside proxy settings.
    If i set system IP in firefox settings, i’m not able to even open Google in browser.
    I tried passing proxy IP from command prompt, it didn’t work.

    If i give Proxy address in firefox settings it won’t get recorded in Jmeter at all.
    Please help…

    1. Alagappan

      Hi Poornachandra,

      Did you install “ApacheJMeterTemporaryRootCA.crt” certificate on your device?
      Check that certificate have a validity (7 days). If not, regenerate that and install again on your device.
      Don’t use to test public application/websites because it has been secured with SSL.(Eg: Google,Whatsapp,etc.)
      Recommended to record Non-secured app/websites in browser which means the application have not secured with SSL certificate.
      Jmeter server and your office network port should be different. If it has a same port, wont work at all.
      Wifi and Port should be same on your device and system.
      Try different wifi network which has not connect with proxy settings.

      Thanks for your feedback.
      Email me at: if anything else.

  3. Poornachandra

    I have done all setup properly, but still i’m not able to record script. Please help

  4. TrainingRite

    Well explained!! Really useful. Keep posting and let us know the new ideas and techniques!!

    :) Thank you

  5. anshu


    I am trying to record script of one office app, but in my personal laptop/network. I followed all steps and i was able to record script. After 2 days i tried again , my app sopped working on changing proxy and now it started showing check your internet connection message as well. Kindly let me know , if you have any solution to this. According to my knowledge, when i was able to record after that I didn’t change any settings, but still not able to record. My internet stop working after changing proxy. Waiting for response.

    1. Alagappan

      Hi Anshu,

      Sure i will help you.

      First, i should recommend you to test Non-secure app which means the app shouldn’t deployed with SSL certificate.If you want to test your own secured product, you may need to install SSL certificate on your device.
      For more information to install certificate on android, go through this:
      For iOS:

      And then ensure to check the following settings has been done on your device and jmeter/laptop.

      1.The Wifi network and port should be same in both device and jmeter.
      2.Device should have installed “ApacheJMeterTemporaryRootCA.crt” certificate. This certificate has 7 days validity period from the date of generated,after that it will expired. you should need to re-generate from jmeter and use it on your device.
      3. Turn off the firewall protection on your windows firewall and antivirus software,their might be restrict your proxy connection.
      4.If your office internet has proxy, you should open the jmeter.bat file behind a proxy (if it has been changed, use that changed proxy to restart your jmeter).

      Note: Secured applications/websites and mobile apps wouldn’t work without those JmeterRootCA and SSL certificates. Don’t use other companies products for performance test in jmeter (eg: Google products,facebook,whatsapp,etc.). Test your own products developed by you or your company.

      Hope it will help you.If you need anything else mail me at

  6. vidhya

    i am trying to test native mobile app api using jmeter .But i am getting this error Remote host closed connection during handshake
    at org.apache.jmeter.protocol.http.proxy.HttpRequestHdr.parse(
    Caused by: SSL peer shut down incorrectly
    … 7 more

    kindly assist me to overcome this

  7. Brooks

    Hi Narayanan,

    Kudos to your work. However, I need some more assistance from your end. I have followed all the steps whatever you described there but still am getting the error message “No Internet connectivity” Can you please respond with your inputs at the earliest with the root cause.

    Note: I have followed the given solutions as well but no use and I got the same result.

  8. Viji Chandramohan


    I am trying to record a native app in my android tab. Even after doing all these setting, my script is not getting recorded, can you please help? In my office, we don’t have a proxy to access internet, its direct.


    1. Alagappan

      Hi Viji.
      Thanks for raising query.

      If you have to access the jmeter at your office network, you should be open the Jmeter.bat file from command line after that you will do all these setting.

      Use below command to open the jmeter:

      Open command prompt and type this: jmeter.bat

      If your internet have a proxy, Use this behind proxy command to open jmeter:

      jmeter.bat -H -P -N

      At any case, always to open the jmeter.bat file from command prompt for recording script (GUI mode) and for load testing recommand you to use Non-GUI mode.

      Please ensure the following setup were done properly after that start the testing on your app:

      1.Your Wi-fi network should be same in both Laptop/Desktop and Mobile/Tab device.
      2.The “ApacheJMeterTemporaryRootCA” cerficate should be installed on your device.
      If your device dont have this cerficate, downlaod that from and send that file through mail then install on your device.
      3.Firewall protection should be disabled in Laptop/Desktop.
      4.Port number should be same in Jmeter and Device.

      After these, still you will not getting recorded. Please let me contact ( I will help you.

  9. Parthasarathy


    I try to start HTTP(s) script recorder but not able to make it. Its not starting

    1. Alagappan

      Please let me know what happen on click the ‘Start’ in HTTP(s) script recorder screen?
      Does the jmeter has been creating the RootCACertificate when start?
      What are the configure steps you did before start?

    2. Kate Wilson

      It will show the actions once you are done performing the steps and then stop the recorder and click on run, then expand the ‘Recording Controller’. All APIs will appear there.

  10. Ashwani

    HI , Is it possible to pull the script from Jmeter so that i can also automate the native android app via Appium or any other Automation tool.

    1. Alagappan

      Yes. you can pull the scripts and save that script as different formats like CSV,JMX,etc.
      You can upload that script file to online tools and get detail report. But am not sure about to automate that scripts via appium tool and other automation tools.

      Online Tools:

      Blaze meter ->
      Redline13 ->

  11. Sagar Sheth

    Good job buddy!!!

  12. Ram Lakshmanan

    Until I read this article, I didn’t know that Apache JMeter can be used for native app load testing. Good eye opener.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>