In this article, Lets see how to record iOS application HTTP/HTTPS requests using JMeter.
Desktop/Laptop Setup:
- Make a note of your Desktop/Laptop IP address.
- Ensure that you have JMeter 2.11 or above & Java 7 or above.
JMeter Setup:
- Start JMeter . (Go to JMETER_HOME/bin, Start jmeter.bat or jmeter.sh)
- Under JMeter Test Plan – Workbench, add ‘HTTP(S) Test Script Recorder’.
- You can add a ‘View Results Tree’ under ‘HTTP(S) Test Script Recorder’ to see the request & response details while recording. (It is not mandatory to have it.)
- In my setup, Proxy server is running at port 2020.
- Click on the ‘Start’ button in ‘HTTP(S) Test Script Recorder’ to start the proxy server.
- You would see above dialog. JMeter will create a certificate – ApacheJMeterTemporaryRootCA.crt under JMETER_HOME/bin. (Java6 does not create this certificate).
- If JMeter does not create new certificate, remove these files in the bin directory & restart proxy server.
- ApacheJMeterTemporaryRootCA.crt
- proxyserver.jks
- Send the certificate to your email.
iOS Device Setup:
- In your ipad/mobile device, open the – ApacheJMeterTemporaryRootCA.crt – file & Install. We would need this if the iOS app uses HTTPS which will lead to SSL handshake issue.
- On your iPad, go to Settings > Wi-Fi and click the arrow next your Wi-Fi connection. Under “HTTP Proxy”, select the Manual button and enter your desktop’s IP address in the Server field. Then enter “2020″ in the Port field.
That’s it. Now your iPad/device will be sending all the requests via your JMeter proxy server running in your PC.
I opened Trello app in my iPad. JMeter started recording all the HTTP requests from iPad.
Thanks for the great guide, much appreciated. In my turn I would like to share another approach – Mobile Recorder service which doesn’t require JMeter proxy configuration and provides self-signed certificates in case if you need to record SSL traffic.
Thanks Dmitri. This is awesome & much easier.
I am unable to install Apache certificate in my iphone 6plus, can u help me in this, and im unable to open websites in mobile broser.
Thanks in advance.
When i install ApacheJMeterTemporaryRootCA.crt in mobile device i get 2 options to select credential use list: 1) VPN and apps 2) Wifi
Do i need to install certificate for both , Also do we need to install this certificate every time while recording the traffic ?
Please raise this question in StackOverFlow.
I am not getting ApacheJMeterTemporaryRootCA.crt and proxyserver.jks in bin folder after starting the j meter recorder .Plz help .my app is using HTTPS requests so unable to record the trace .
Please raise this question in StackOverFlow. stackoverflow.com/questions/tagged/jmeter
@vlns : i got the resolution dude .I am using Blazemeter now .