DEV Community 👩‍💻👨‍💻

Raghwendra Sonu
Raghwendra Sonu

Posted on

Mobile Performance Testing using JMeter

In this article we are going to do performance testing on Android mobile device using JMeter. Here are the steps to do this.

Step 1: Ensure that Mobile and Laptop (desktop) should be connected to the same wifi network. Make Developer Options enabled on your Mobile phone and you are able to connect to your laptop using Android Debug Bridge(ADB).
Have a look at this article and follow steps, in-case your mobile is not connected through ADB:

At command prompt type adb devices command, this will list the connected device.
Alt Text

Step 2: Goto JMeter on your desktop/ laptop and Add Template - RECORDING, from File option to get a test plan with HTTP(S) Test Script Recorder.

Alt Text

Set Port for Recording, we will configure the same port on our mobile.

Step 3: Click Start for recording, it will generate a certificate "ApacheJMeterTemporaryRootCA.crt" inside "JMeter/bin" folder. Copy the certificate and put it inside any folder of your phone.

Alt Text

Step 4: Install Root CA Certificate on the Mobile device.

Goto Your Wi-Fi -> More -> Install Network Certificates. Choose from the folder your have saved in Step 3.

Alt Text

Step 5: Configure mobile phone, set IP and PORT. Note down the IP of the Laptop/ Desktop system.
Goto Wi-Fi in your phone -> long press on the Wi-Fi you are connected -> Manage Network Settings enter below things.
IP Settings: DHCP
Proxy Hostname: IP Address of your Laptop/ Desktop
Proxy port: the port you have entered on JMeter for recording. See Step 2.

Alt Text

Step 6: Start Recording, actions you do on your mobile device should get recorded in JMeter.

Alt Text

Step 7: Run & Validate the results.

Alt Text

Thanks for reading.

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.