0% found this document useful (0 votes)
13 views

Jmeter Mobile Testing

Uploaded by

arnav singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Jmeter Mobile Testing

Uploaded by

arnav singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

How to do mobile performance testing

using JMeter?

MARCH 22, 2021


Solved - Hempreet Singh
Email - [email protected]
LinkedIn - https://www.linkedin.com/in/hempreet-singh-0a6ba66a
Introduction
So the purpose of creating this document is to help people who
know Web Testing in JMeter but not able to do Mobile app
testing Using JMeter and Most of us are unaware
that JMeter can also be used for performance testing of
Android and IOS apps.

I will be Keeping this document Simple and easy and after


going through this document you will be able to Record and
Replay Scripts in JMeter.
Prerequisites: JMeter version 4.0, Android phone (KitKat or
above) or iPhone (version 10 onwards)
JMeter Configurations
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 set up a 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. ApacheJMeterTemporaryRootCA.crt can be
downloaded from
https://gist.github.com/borisguery/9ef114c53b83e553b635
➢ Install this certificate on your iPhone.
Android proxy configuration:

➢ We must download JMeter Certificate and save it to our


phone. ApacheJMeterTemporaryRootCA.crt can be
downloaded from
https://gist.github.com/borisguery/9ef114c53b83e553b635
➢ Then we must install that certificate to the Android device

Steps to add certificate to the android device (Step can be


different for different android versions)

• Open your phone's Settings app.


• Tap Security Advanced. Encryption & credentials.
• Under "Credential storage," tap Install a certificate. Wi-Fi
certificate.
• In the top left, tap Menu.
• Under "Open from," tap where you saved the certificate.
• Tap the file. ...
• Enter a name for the certificate.
• Tap OK.

➢ 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.


Recording Mobile App with JMeter

➢ 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.
Running a Load Test and monitor the performance

Running the Mobile app test is similar web application.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.

We

Add Listener
will now add a listener. Let us add View Results Tree Listener under the Thread Group (User) node. It
will ensure that the results of the Sampler will be available to view in this Listener node element.
To add a listener −
• Open the context menu
• Right-click the Thread Group (Users)
• Choose Add → Listener → View Results Tree option

You might also like