DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Web App Load Testing Using Maven Plugins for Apache JMeter, and Analyzing the Results
  • Implementing a Weekly Release Cycle for Mobile Apps
  • Autonomous QA Testing With Playwright, LangGraph, and GPT-4o on AWS
  • Interrupt Testing: Bulletproof Your App for the Real World

Trending

  • Product-Led Software Delivery: Intelligent Platforms for DevOps at Scale
  • Navigating the Complexities of AI-Driven Integration in Multi-Cloud Environments: A Veteran’s Insights
  • RAG Done Right: When to Use SQL, Search, and Vector Retrieval and How To Combine Them
  • AWS Kiro: The Agentic IDE That Makes Specs the Unit of Work
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Testing, Tools, and Frameworks
  4. How to Record Mobile Applications With Apache JMeter

How to Record Mobile Applications With Apache JMeter

Learn how to record Android or iOS mobile apps with JMeter for performance testing.

By 
Rupesh Garg user avatar
Rupesh Garg
·
Nov. 14, 18 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
33.9K Views

Join the DZone community and get the full member experience.

Join For Free

Recording of mobile application traffic is not much different from what we do to record scripts for web applications. All we have to do is put the proper proxy in place for a mobile device. Follow the below steps for Android or iOS mobile apps.

Open JMeter and right-click the Test Plan>>Add >>Threads (Users)>>Thread Group.

Image title

Right-click the Thread group>>Add>>Logic Controller>>Recording Controller.Image title

Right-click the Threads>>Add>>Listener>>View Results Tree (to see response data while running the script).Image title

Add test script recorder by selecting Add>Non-Test Elements>HTTP(S) Test Script Recorder option.Image title

Add '9090' as the Port value and click the Start button. This will start the JMeter proxy on localhost.Image title

On 'Start' of HTTP(S) Script Recorder you will see a dialogue box of Root CA Certificate — just click the 'OK' button to get rid of it.Image title

Android proxy configuration:

  1. Go to Settings > Wi-Fi option (the shared Wi-Fi network should be same for both Mobile and PC where JMeter is installed).
  2. Long tap the network which you are connected and click the 'Modify Network' option.
  3. Check the 'Advanced options' checkbox.
  4. This will open advanced settings from which we can modify proxy manually. For this, set 'Proxy'option to 'Manual'.
  5. Now, set 'Proxy hostname' as your PC IP address and 'Proxy port' to 8080 as we have set up in JMeter Proxy server.
  6. Click 'Save', now you can start running the application on your mobile device and its requests will be recorded in JMeter.

iOS configuration:

  1. Go to Settings > Wi-Fi option (the shared Wi-Fi network should be same for both Mobile and PC where JMeter is installed).
  2. Click on the connected network.
  3. Select the 'Manual' option from HTTP Proxy section.
  4. Set the 'Server' as your PC IP address and 'Port' to 8080 as JMeter proxy server.

Recording a Mobile App Script

  1. Before running any application, make sure that you click the 'Start' button on HTTP(S) Test Script Recorder in JMeter.
  2. Open the mobile application you want to test and play around with the functionality the way you want it to be recorded in JMeter for load testing.
  3. As we have set the mobile connection over JMeter's proxy, thus all test flow are recorded to JMeter's Test Plan.
  4. Once you are done recording all the test flows of your application, stop the recording by 'Stop' button on 'HTTP(S) Test Script Recorder' in JMeter and save the Test Plan.Image title

Now run your Test Plan by clicking the 'Play' button displayed in green.Image title

After playing the Test Plan you can view the response of the each request in 'View Result Tree'.Image title

Your script is ready for load testing. You may further refine it by adding correlation, parameterization, etc.

mobile app Apache JMeter Testing Test script Record (computer science)

Opinions expressed by DZone contributors are their own.

Related

  • Web App Load Testing Using Maven Plugins for Apache JMeter, and Analyzing the Results
  • Implementing a Weekly Release Cycle for Mobile Apps
  • Autonomous QA Testing With Playwright, LangGraph, and GPT-4o on AWS
  • Interrupt Testing: Bulletproof Your App for the Real World

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook