Before we jump to how to do it we need to understand why to do it. Mobile applications can be classified into below types:
Native Apps - Applications downloaded from online market/store and installed on specific device are categorized as native mobile apps. These applications are developed by using specific programming language (like Java for Android and Objective-C for iOS) and device specific API. These applications are static applications and they do not communicate to sever. Games and applications downloaded from app store or market are examples of native apps.
Web Apps- Applications accessed through internet on mobile browsers are called mobile web apps. These applications are developed with web technologies like HTML, JQuery and JavaScript. Popular social media applications like Facebook (http://m.facebook.com) and Gmail (http://m.gmail.com) etc. have their separate mobile based web apps which are very famous among mobile users.
Hybrid Apps- Combination of web and native mobile apps is called Hybrid app. In such applications, web apps are embedded into native mobile apps. User interface is normally covered in native part of the application while content is loaded through web part of the application. Facebook, LinkedIn and Twitter apps installed on a mobile are best examples where application interface is installed but contents is loaded from the web.
Jmeter can only be used for testing web and hybrid applications. And like any tyical web application jmeter can be used for recording the communication between client and server by using jmeter proxy. Basic process of testing remains the same
Record >> Enhance Script >> Replay
Process of recording
1. Connect mobile device to wifi network - This network should be same as the network on which JMETER is deployed
2. In the desktop computer initiate jmeter proxy
3. In mobile network settings point it to IP of computer hosting jmeter proxy
The communication between the device or emulator and the server is recorded through the proxy based recorder. Both Jmeter and the mobile device must be on the same network. The mobile device must be connected to the Jmeter network in Wi-Fi. On the mobile device, it is necessary to manually modify the proxy used by the application or by the browser. The hostname must be the name or the IP of the JMETER machine.
Replaying the virtual users
You can replay the users just as you do any of the normal web app testing .
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.
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.
- 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.
- 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.
Before we jump to how to do it we need to understand why to do it. Mobile applications can be classified into below types:
Native Apps - Applications downloaded from online market/store and installed on specific device are categorized as native mobile apps. These applications are developed by using specific programming language (like Java for Android and Objective-C for iOS) and device specific API. These applications are static applications and they do not communicate to sever. Games and applications downloaded from app store or market are examples of native apps.
Web Apps- Applications accessed through internet on mobile browsers are called mobile web apps. These applications are developed with web technologies like HTML, JQuery and JavaScript. Popular social media applications like Facebook (http://m.facebook.com) and Gmail (http://m.gmail.com) etc. have their separate mobile based web apps which are very famous among mobile users.
Hybrid Apps- Combination of web and native mobile apps is called Hybrid app. In such applications, web apps are embedded into native mobile apps. User interface is normally covered in native part of the application while content is loaded through web part of the application. Facebook, LinkedIn and Twitter apps installed on a mobile are best examples where application interface is installed but contents is loaded from the web.
Jmeter can only be used for testing web and hybrid applications. And like any tyical web application jmeter can be used for recording the communication between client and server by using jmeter proxy. Basic process of testing remains the same
Record >> Enhance Script >> Replay
Process of recording
1. Connect mobile device to wifi network - This network should be same as the network on which JMETER is deployed
2. In the desktop computer initiate jmeter proxy
3. In mobile network settings point it to IP of computer hosting jmeter proxy
The communication between the device or emulator and the server is recorded through the proxy based recorder. Both Jmeter and the mobile device must be on the same network. The mobile device must be connected to the Jmeter network in Wi-Fi. On the mobile device, it is necessary to manually modify the proxy used by the application or by the browser. The hostname must be the name or the IP of the JMETER machine.
Replaying the virtual users
You can replay the users just as you do any of the normal web app testing .
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.
Native Apps - Applications downloaded from online market/store and installed on specific device are categorized as native mobile apps. These applications are developed by using specific programming language (like Java for Android and Objective-C for iOS) and device specific API. These applications are static applications and they do not communicate to sever. Games and applications downloaded from app store or market are examples of native apps.
Web Apps- Applications accessed through internet on mobile browsers are called mobile web apps. These applications are developed with web technologies like HTML, JQuery and JavaScript. Popular social media applications like Facebook (http://m.facebook.com) and Gmail (http://m.gmail.com) etc. have their separate mobile based web apps which are very famous among mobile users.
Hybrid Apps- Combination of web and native mobile apps is called Hybrid app. In such applications, web apps are embedded into native mobile apps. User interface is normally covered in native part of the application while content is loaded through web part of the application. Facebook, LinkedIn and Twitter apps installed on a mobile are best examples where application interface is installed but contents is loaded from the web.
Jmeter can only be used for testing web and hybrid applications. And like any tyical web application jmeter can be used for recording the communication between client and server by using jmeter proxy. Basic process of testing remains the same
Record >> Enhance Script >> Replay
Process of recording
1. Connect mobile device to wifi network - This network should be same as the network on which JMETER is deployed
2. In the desktop computer initiate jmeter proxy
3. In mobile network settings point it to IP of computer hosting jmeter proxy
The communication between the device or emulator and the server is recorded through the proxy based recorder. Both Jmeter and the mobile device must be on the same network. The mobile device must be connected to the Jmeter network in Wi-Fi. On the mobile device, it is necessary to manually modify the proxy used by the application or by the browser. The hostname must be the name or the IP of the JMETER machine.
Replaying the virtual users
You can replay the users just as you do any of the normal web app testing .
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.
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.
- 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.
- 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
Post a Comment