Mobile Performance Testing: Record Script in JMeter

Being a versatile tool, JMeter can be used for mobile performance testing as well. It provides handy features to prepare and run our mobile specific performance test scripts. In this tutorial, we have explored and listed down steps to record a performance test script in JMeter for Android and iOS platforms.

It’s not much different from what we do to record script for web applications. All we have to do is put proper proxy in place for mobile device. We’ll see how to do it further in this post but first, let’s prepare JMeter to record our script.

JMeter proxy configuration:

  • Open JMeter and right click on WorkBench.
  • Add test script recorder by selecting Add–>Non-Test Elements–>HTTP(S) Test Script Recorder option.
  • Add 8080 as Port value and click Start button. This will start the JMeter proxy on localhost. (For more details about test script recorder fields, refer this article.)

Now we need to setup the JMeter proxy in mobile devices so that all mobile requests will be recorded in JMeter. Perform below steps to setup proxy in Android and iOS platforms.

Android proxy configuration:

  • Go to Settings–>Wi-Fi option.
  • Long tap on connected network and click ‘Modify Network’ option.
  • From the opened dialog box, check ‘Advanced options’ check box.
  • This will open advanced settings from which we can modify proxy manually. For this, set ‘Proxy’ option to ‘Manual’.
  • Now, set ‘Proxy hostname’ as your computer’s IP address and ‘Proxy port’ to 8080 as we have setup in JMeter configuration. Refer below image to get an idea about this setup.Mobile Performance Testing: Android proxy configuration
  • Click Save option. You can now start running the application in your mobile device and its requests will be recorded in JMeter.

iOS proxy configuration:

  • Go to Settings–>Wi-Fi option.
  • Click on your connected network.
  • Select ‘Manual’ option from HTTP Proxy section.
  • Set ‘Server’ value as your computer’s IP address and ‘Port’ value to 8080 as JMeter configuration. Refer below image to get an idea about this setup.Mobile Performance Testing: iOS proxy configuration
  • You can now start running the application in your mobile device and its requests will be recorded in JMeter.

We hope you were able to record JMeter script for mobile performance testing after following above steps. Let us know how it goes for you.

Comments
  1. Dmitri T
  2. Roshan
  3. Badri
  4. amar
  5. Ha
  6. ranjit
  7. Priyanka
    • Prashanth
  8. Ali
  9. sakshi
    • Deepak
    • Prashanth
  10. Pradeep
  11. Prashanth

Leave a Reply

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