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. Jmeter can help to do performance test for both Android and iOS mobile apps.
- Computer and mobile device should be connected the same network.
- Apache JMeter & Java JDK has to be downloaded and be installed on your computer.
- Apache JMeter temporary Root CA must be installed. If it is not installed, HTTPS recording cannot be work.
Recording JMeter Scripts:
Below is the process to record a performance test script in JMeter for Android and iOS platforms.
JMeter proxy configuration
These were the configurations we need to make in JMeter in order to record the scripts. Now, we need to set up the JMeter proxy in mobile devices so that all mobile requests will be recorded in JMeter. Follow the steps mentioned below to set up proxy in android and iOS platforms.
Now find your IP Address by ifconfig for Linux and ipconfig for Windows. We will load up this IP address on our phone Android/iOS phone to setup proxy.
Mobile side configuration:
Installation of Apache JMeter temporary Root CA:
Where is Apache JMeter Temporary Root CA Located?
ApacheJMeterTemporaryRootCA is located in the Jmeter\bin folder. Certificates have limited lifetime, around 7 days only, if it is expired you will need to reinstall it. If you cannot find this file, When you start JMeter’s HTTP(S) Test Script Recorder, JMeter will generate “ApacheJMeterTemporaryRootCA.crt” automatically.
How to install JMeter Temporary Root CA file?
- On your computer, rename the file with the .cer file extension, and send the file as an email attachment to an account that you can access from your Android device.
- Check your email on the Android device.
- Open the email and tap the attachments button.
- Then tap the save button. This should save the certificate file to your Android device’s “Download" folder.
- Next locate and tap the "Settings” icon. This may be located in the “Apps” menu or on one of the device's home screens.
- Tap the “More” button.
- Beneath the “Permissions” header tap the “Security” button.
- In the “Security” menu select the “Install from device storage” from beneath the "Credential storage" header.
- You will now be asked to “Name the certificate”, leave the certificate name as it is and tap “OK”.
- In some versions of Android, your device will ask if you want to use the certificate for "VPN and apps" or "WiFi".
- In the "Credential use:" options, you should select "VPN and apps".
- The phone will revert to the security menu and will inform you via a small pop up that the certificate is installed.
- You can check the Certificate is installed by tapping the “Trusted credentials" button.
iOS proxy configuration
- Go to Settings>Wi-Fi option.
- Click on the connected network.
- Select the ‘Manual’ option from HTTP Proxy section.
- Set the ‘Server’ value as your computer’s IP address and ‘Port’ value to 8080 as JMeter configuration. Refer the image given below to get an idea about this set up.
Android proxy configuration
- Go to Settings>Wi-Fi option.
- Long tap the connected network and click the ‘Modify Network’ option.
- From the opened dialog box, check the ‘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 set up in JMeter configuration. Refer the below image to get an idea about this setup.
- Click ‘Save’ option. You can now start running the application on your mobile device and its requests will be recorded in JMeter.
7> But, before running any application, make sure that you click the “Start” button on HTTP(S) Test Script Recorder screen in JMeter.
8> On clicking the “START” button you may get some Root CA Certificate message dialogue. Just click the “OK” button to get rid of it.
10> Once you are done with the recording of all steps of the test case, stop the script by clicking the “Stop “button at “HTTP(S) Test Script Recorder screen in JMeter.
13> Click on Veiw Result Tree.
14> Here you will see the execution result of your script.
ConclusionWith a decade long experience in Mobile app testing services and quality assurance, we here at OdiTek Solutions have developed a unique business-driven test management and test execution approach that ensure that your mobile app delivers high quality user experience and at the same time have a lowest possible time-to-market. We use Apache JMeter not only for web testing but also a number of other test functions. We use Apache JMeter 2.7 to test performances of both static and dynamic resources like files, servlets and others. Our developers and testing engineers also use them to simulate heavy load on networks, servers or the object and test the strength; they also analyze and test the performance in different load conditions and types.
To know more about OdiTek's Mobile App Testing with Jmeter, please drop an e-mail at - email@example.com
What OdiTek offers
Refer our Skills page:
We had a tough deadline to launch our .Net based application that processes a lot of data, and got very frustrated with our development agency we hired. Fortunately we got Oditek, and they took over seamlessly the product development, launched the app & continued feature development. Just awesome!
They were very attentive to our needs as clients and went out of the way to make sure our projects were taken care of. They were always able to get projects done in the specifications we requested. They are passionate about getting things done; I would definitely recommend them to lead any IT projects.
I worked with OdiTek on few high profile banking application projects. They did a fantastic job with web applications & manual testing on the VAS apps for two leading banks of UK that included rigorous UAT phases. I recommend them for any application development where security matters.
OdiTek is our extended team who works on our key software projects. They are dependable, good in collaboration and technically very much to the level what we expect a global team should be. They had transformed our web applications, CRM and added mobility to existing business platforms here.
It's been more than 4 years now that we are working with OdiTek on our cloud based web product development. It's been amazing working together, they are very competent on designing scalable, high performance apps. Their technical support is outstanding to say the least, even at odd hours.
I am a fan of Team OdiTek since 2014 and have worked on many product development projects together. Specially worth mentioning their deliveries on VAS Banking web application development & manual testing services for Smarta, UK. They are highly skilled & a professional team to work with.
OdiTek has been working on our Integrated Web-scale Mobile Platform i.e. Optimal Health since 2014. They are very professional and takes care of the requirements meticulously. They are technically very sound and sincere in ensuring quality & performance. Wonderful working with them!
You can trust the team, with minimum supervision you get the work done. They are honest, professional & committed to schedule & quality. I had been successfully running 3 business applications designed, developed and maintained by Oditek developers. It’s been a pleasure working with them.
OdiTek has been working in custom software development, including services for test automation. Many of them have worked with me in 2009-10 when I was R&D Manager in NetHawk India. They have great enthusiasm & a passion to excel in bringing customer success. Their work has been very impressive.
It's amazing to see these guys are turning their experience into a global delivery excellence at OdiTek. I am sure their past large scale product development experience will be handy to product companies. I would always recommend Oditek for software development, especially performance-driven solutions.