Skip to main content

How to Test Native App Performance using Apache JMeter?

JMeter records mobile application requests on HTTP(S) Script Recorder and it has features to prepare and run our mobile application performance test scripts. All we have to do is to configure JMeter and Mobile device. In JMeter, we can test both iOS and Android native applications.

Steps to Configure JMeter:

  1. Go to apache-jmeter-3.1/bin folder and start the jmeter.bat (Batch) file.
  2. Right click on “Test Plan” > Add > Threads User(s) > Thread Group.
  3. Right click on “Thread Group” > Add > Logic Controller > Recording Controller.
  4. Right click on “Thread Group” > Add > Listeners > View Results in Tree.
  5. Add HTTP(s) Script Recorder to Workbench by selecting Workbench > Add > Non-Test Elements > HTTP(s) Script Recorder option.
  6. Add Port value as 8080 and click “START” button in script recorder. The JMeter proxy will be started on localhost.
Next, we need to configure the mobile device as per the following steps.

iOS Device Proxy Configuration:

  1. Go to Settings > Wi-Fi option. (Note: Network should be same for both Mobile and Laptop/Desktop).
  2. Click on the Connected network.
  3. Select “Manual” option from HTTP Proxy.
  4. Set ‘Server value as system IP address and Port value to 8080 as per JMeter setup.
  5. Now start the application on the device and its each request will be recorded in JMeter.
  6. Add Port value as 8080 and click “START” button in script recorder. The JMeter proxy will be started on localhost.
  7. Next, we need to configure the mobile device as per the following steps.

    iOS Device Proxy Configuration:

    1. Go to Settings > Wi-Fi option. (Note: Network should be same for both Mobile and Laptop/Desktop).
    2. Click on the Connected network.
    3. Select “Manual” option from HTTP Proxy.
    4. Set ‘Server value as system IP address and Port value to 8080 as per JMeter setup.
    5. Now start the application on the device and its each request will be recorded in JMeter.

Android Device Proxy Configuration:

#1. Go to Settings > Wi-Fi option.
#2. Press and hold on connected network and Click ‘Modify Network’ option.
#3. This will open advanced settings from where we can modify Proxy.
#4. Change the Proxy to Manual.
#5. Set Hostname value as system IP address and Port value to 8080 as per JMeter setup.
#6. Click on ‘Save’.
#7. Now start the application on the device and its each request will be recorded in JMeter.
#8. Before running the application, make sure that HTTP(S) script recorder was started in JMeter.
#9. Once the application is started, the actions of the script will be recorded under “Recording Controller.”
#10. Once actions are done in the application, stop the script recording by clicking ‘Stop’ button in HTTP(S) script recorder screen.
#11. Now, expand the “Recording Controller” in JMeter. You can view all the Recorded scripts of whatever actions are done in the applications.
#12. Finally, click the ‘Play’ button. It will run recorded scripts as per your Threads setup.
#13. Click on “View Results in Tree”. Here you will see the result of your script.


Solutions for issues while testing the mobile application:

Here are the solutions for the issues that we have noticed while doing the load test in JMeter.
Issue 1
The application wasn’t getting loaded.
Solution
The issue is caused because our system was enabled with the firewall protection in security software. This is restricting network connection when setup with the proxy. We have disabled the firewall protection in antivirus settings.
Issue 2
Internet was not working with Proxy on the mobile device when we configure the mobile device and JMeter.
Solution
The reason might be that the system IP address is not configured with JMeter properties which mean the current IP address is not added to the JMeter properties file. We have added remote host IP address to property file as per the following steps.
  1. Open the browser and type IP address and Port number that is mentioned in JMeter to check whether it was configured. If browser shows Connect, then it is working fine otherwise if it is continuously loading, then it was not configured. Then we have to follow the below steps:
  2. Open apache-jmeter folder from the local drive and go to the bin folder.
  3. Open “jmeter (.properties)” file and find “Remote hosts and RMI configuration” section on this file.
  4. Under this section, add the system IP to remote hosts with comma delimited and save the file.

Comments

Popular posts from this blog

Better Tableau implementation gives BI dashboards a boost

When the telecommunications group at General Motors initially began using Tableau dashboards to track service requests and incidents, reports had such long load times that managers couldn't use them effectively. "It really wasn't something they could use on their own, let alone use in a meeting," said Katrina Botting, who heads data strategy and intelligence for GM's telecom organization, in a presentation at Tableau Conference 2017. It wasn't until last year, when Botting and her team learned how to effectively utilize the software's data extract feature as part of GM's Tableau implementation, that reports loaded quickly enough to be truly self-service. The extract feature loads a snapshot of data stored on disk into memory; now, virtually all reports are based on extracted data, and reports that once took several minutes to load do so in seconds, Botting said. Managers in the telecom unit used to meet with each other just to make sure they a...

Evolution of SQL Server from SQL 2000 to SQL Server 2008 R2

As a software professional i would attend some technical interviews with some reputed companies for their open positions. Most of them asked me  What is the differenced between SQL 2000 and 2005 . Since i have worked on all SQLversions from SQL Server 7.0/2000 to 2008 r2, I felt just like our human race is evolving, SQL Server is also evolving. Each release will meet with exact requirement of the industry it was born. When SQL Server has evoled from SQL Server 2000 to SQL Server 2005, this was the major difference we felt, in a quick summary in tabular format. Feature SQL Server 2000 SQL Server 2005 Security Owner = Schema, hard to remove old users at times Schema is separate. Better granularity in easily controlling security. Logins can be authenticated by certificates. Encryption No options built in, expensive third party options with proprietary skills required to implement properly. Encryption and key management build in. High Availability Clustering or Log Shipping...

The keys to a successful business intelligence strategy

Business intelligence (BI) is essential for business growth and competitive advantage, yet reaping benefits from BI requires more than implementing the technology that enables it. In fact, deploying the technology is the easiest part of any BI initiative, according to Boris Evelson, vice president and principal analyst at Forrester Research. Getting the personnel and processes portions right are much more challenging, he says. As such, organisations must addresses personnel and processes as key facets of their  BI strategy  if they want to be successful. Moreover, BI strategies should be broken down even further to address ownership and continual improvement as well. These are the seven essential components of any successful BI strategy, according to BI experts. Give business ownership over BI Organisations that place BI in the hands of business users have greater success rates than those who confine BI within IT, Evelson says. This may mean embedding BI within line...