How to Record a Script For a Mobile App for JMeter

Written by indrivetech | Published 2022/06/20
Tech Story Tags: jmeter | android-studio | mobile-apps | scripting | mobile-app-development | android-app-development | jmx | proxyman

TLDRThe manual is suitable for any application, but it’s better to automate it. We use Android Studio + Proxyman with prepared emulators and Proxyman to work with JMeter. If all has gone well, we will see traffic from Remote Devices. We hope that tutorial will be helpful for you. If you have any other questions, please ask in the comments. If we have any more questions about the tutorial, please share it with us on Twitter @dailymailonline.com/jmeter/.via the TL;DR App

We have a mobile application we need to prepare many scripts for JMeter. We could do it by hand, but it’s better to automate it. In my case, the application can work in two modes — the contractor and the customer. This manual is suitable for any application.

Prerequisites:

Let’s start.

1. Open up Android Studio. I have two of them (the certificate makes it impossible to record simultaneously into both of them, so we need to alternate):

2. Open up Proxyman. Go to the Certificate tab → Install Certificate on Android → Emulators:

3. Click on Override Emulator and install the certificate to both devices:

4. If all has gone well, we will see traffic from Remote Devices:

5. Working with Android Studio + Proxyman:

  • Install the latest or specific build, and run two devices:

  • View queries in the sniffer. Select the rows we need and save them to the HAR file:

6. Use the HAR to JMX converter.

7. Convert the file to JMX and get a template to work in JMeter.

We hope this tutorial will be helpful for you. If you have any other questions, please ask in the comments.


Written by indrivetech | Team of inDrive developers who know how to experiment and learn from their mistakes for growth.
Published by HackerNoon on 2022/06/20