How to record native iOS app requests in Jmeter? - jmeter

I have tried recording native iOS app ( developed in Swift and Objective C++ ) in Jmeter using proxy but it didn't worked .
I also tried recording native app ( removing SSL from app ) but it didn't worked either.

For recording HTTPS traffic you need to install JMeter's self-signed certificate onto your mobile device. The file is called ApacheJMeterTemporaryRootCA.crt and you need to pass it somehow to your iOS device (send by email, upload to a web server and open it in your browser, etc.)
The file is being generated under "bin" folder of your JMeter installation when you start HTTP(S) Test Script Recorder
Additionally you will need to switch on "ENABLE FULL TRUST FOR ROOT CERTIFICATES", the setting lives under Settings -> General -> About -> Certificate Trust Settings
Be informed that the certificate has limited life span (7 days by default) so if you imported it a while ago you will need to reinstall the "fresh" version.
Also make sure to turn off the cellular data and configure Wi-Fi adapter to use JMeter as the proxy, given you start the proxy and properly configure your device to use it you should be able to capture HTTP traffic without any extra setup and HTTPS traffic if you have the JMeter's certificate installed.
All the traffic which is not HTTP or HTTPS will not be captured/recorded
More information: Load Testing Mobile Apps Made Easy

Related

Unable to test mobile application using Test Script Recorder

I am trying to test mobile application using jmeter Test Script Recorder but When i set proxy in my mobile and then I tried to captured, It shows all the time "No internet connection". I have set correct ip and port number.
Can anyone help me ?
There is more than one mobile operating system and troubleshooting options differ depending on vendor and OS.
Double check that you actually started HTTP(S) Test Script Recorder and there are no modal dialogs with warnings/errors and nothing suspicious in jmeter.log file
JMeter itself must have internet connectivity, if your machine is behind the corporate proxy - you will need to apply some extra configuration
Check if you can record anything using web browser on mobile device. Start with HTTP-based simple site i.e. http://example.com
If your application is using HTTPS protocol you will need to install JMeter's self-signed certificate onto the device, the file is called ApacheJMeterTemporaryRootCA.crt and it's being generated in "bin" folder of your JMeter installation when you start HTTP(S) Test Script Recorder and you need to transfer it to your device somehow (bluetooth, email, whatever) and follow your OS dialog to get it installed and trusted
For certain Android versions you might need to use a 3rd-party tool like ProxyDroid in order to proxy HTTPS traffic
For iOS devices you will need to "tell" that you trust JMeter's certificate under Settings -> General -> About -> Certificate Trust Settings
See the following materials for more information:
HTTP(S) Test Script Recorder user manual entry (pay attention to HTTPS recording and certificates chapter)
Apache JMeter proxy Step-by-step
You can consider using a cloud-based proxy service, in this case you will not have to worry about certificates generation and installation and will have confidence that the device will have Internet connectivity. As a bonus you will have possibility to export recorded script in "SmartJMX" mode with automatic detection and correlation of any dynamic parameters.

I am not able to record Mobile Native Banking apps using JMeter

I am using JMeter 3.3.
I am not able to record traffic from our mobile banking app but I am able to record traffic from simple app which are less secure like weather channel. Can anyone help me here to make my mobile banking app work?
Most probably you need to install JMeter's self-signed certificate onto your mobile device:
Locate ApacheJMeterTemporaryRootCA.crt file (it's being generated in "bin" folder of your JMeter installation when you start HTTP(S) Test Script Recorder)
Transfer it to device somehow (i.e. send it via email and open the attachment on the device side)
Import the certificate to the device, follow your mobile operating system instructions on how to do this
Assuming everything goes well JMeter should be able to intercept, decrypt and record mobile traffic (You might need a 3rd-party application to proxy the secure traffic, i.e. ProxyDroid for Android OS)
You can also consider using a cloud proxy which makes the process of installing the certificate easier, check out A Step by Step Guide to Performance Testing on Native Mobile Apps article for more details.

Performance Testing for Hybird App

I am supposed to do a performance test for a Hybrid App.
First, from my adroid device i have modified the proxy settings by choosing Manual option and entered my system IP address as proxy server 192.168.1.10 and entered Port as 8080.
And then from Jmeter 3 i took Recording Controller Template from HTTPS Script Recorder I entered the port as 8080.
After Starting HTTPS Script Recorder when i opened my hybrid app it was not working. "Unfortunately we cannot find your account information". This means that Hybrid apps is not connecting internet through Proxy mode.
But i am able to get response from other apps installed in my android device.
I tried Neoload, Blazemeter as well https://guide.blazemeter.com/hc/en-us/articles/207420545-BlazeMeter-Proxy-Recorder-Mobile-and-web-.
But the same issue i faced every where.
Please provide me a solution to make the Hybird App work even after connecting internet through Proxy Mode.
Thanks
N Ali
You need to find out the main error using i.e. Logcat Command to narrow down the possible reasons as there could be too may of them.
The below hints are applicable for HTTPS traffic only, however I'm pretty sure that modern applications use HTTPS protocol.
You may need to use a 3rd-party application in order to set up HTTPS proxy, i.e. ProxyDroid
You will definitely need to install JMeter's self-signed certificate onto device so JMeter could decrypt and record secure traffic.
Locate ApacheJMeterTemporaryRootCA.crt under "bin" folder of your JMeter installation and transfer it to your android device (i.e. send it to yourself via the email)
Click at the attached certificate
Follow android system certificate installation dialog to get it set up
Be aware that JMeter's certificate has limited life time (7 days) so you won't be able to record secure traffic if it is expired.
More information:
HTTPS recording and certificates
Load Testing Mobile Apps Made Easy
In addition to Dimitri's answer reg JMeter, NeoLoad also has a similar CA certificate which needs to be added to the device.
You can locate this certificate from
C drive -> Users -> Username -> Appdata -> Roaming -> Neotys -> CA certificate
Copy this certificate to your device (or mail it to yourself) and install it either by directly selecting it or from the security settings.
Once the certificate is installed in the device, you should be able to record the HTTPs traffic from the application via proxy.
P.S. Ensure that you are able to view all hidden files coz by default Appdata is hidden.

Record native mobile app with Jmeter

I am trying to record mobile app with Jmeter, the app has URLs with https,
I am using jmeter 3.1 and configured mobile and machine such that I am able to record URL(both http and HTTPS) and app from mobile in jmeter. Now I have an application, with the same configuration I have tried recording that app, but not able to record anything and the strange thing is that when I am trying to login into the app with proxy in mobile it's says "Unable to connect to server", but without proxy it's logining successfully. Does someone come across this situation. Please let me know if there could be any solution for this.
Unable to connect to server has many faces, going forward include more details into the question, i.e. mobile operating system, proxy configuration details, etc.
In the meantime here is a checklist:
JMeter can record only HTTP and/or HTTPS, other protocols are not supported
You need to configure mobile device to use the host running JMeter as a proxy for both HTTP and HTTPS protocols. For certain operating systems you may need 3rd party software, i.e ProxyDroid in order to setup HTTPS proxy
In case of HTTPS traffic you will need to install JMete's self-signed certificate - ApacheJMeterTemporaryRootCA.crt onto your mobile device. If did it already - be informed that JMeter certificates has limited life span (4 months or something like that) so you need to periodically "refresh" them. The fastest and the easiest way of installing the certificate is sending the aforementioned file to yourself via email and opening the attachment using the mobile device.
See HTTPS recording and certificates chapter of the HTTP(S) Test Script Recorder JMeter User Manual entry for more details.
You can also View the Webcast: Performance Testing for Native Mobile Apps to learn about alternative ways of recording mobile traffic and converting it into a JMeter test.

Record HTTPS requests of a mobile IOS/Android application with JMeter

Is it possible to record httpS requests of a native app (IOS or Android) with JMeter? I tried some ways that I found but, I've not resolved the problem..
Use jmeter 3 with Java 7 or 8, it creates a crt file in jmeter/bin folder. It is the CA that creates the certificates.
Send this file by mail and open it in Android / iOS then install it.
In test script recorder, put in the dedicated field HTTPS domains , the domains you are trying to hit, see:
-http://jmeter.apache.org/usermanual/component_reference.html#HTTP(S)_Test_Script_Recorder
Restart Ipad/Android and jmeter test script recorder and try again.
to do this, you have to make your device trust the Jmeter Proxy CA.
So, you have to import the Jmeter CA certificate from
$JmeterHome/bin/ApacheJMeterTemporaryRootCA.crt
into the device.
I remember this is an area where things improved a lot recently, so be sure to have the last version installed.
Try deleting ApacheJMeterTemporaryRootCA.crt, JMeter's self-signed certificates have very limited life time (I recall something like 1 week), so if your certificate is older you might have problems installing it into browsers and/or mobile devices or it won't decrypt SSL traffic. The file will be re-created next time you start HTTP(S) Test Script Recorder
There is an alternative way of recording the mobile traffic by using your personal cloud proxy. Moreover, it will perform automatic correlation for you so you won't have to worry not only about SSL certificates, but also about Regular Expression extractor, JMeter Variables, etc. Check out How to Cut Your JMeter Scripting Time by 80% article for details.
If none of the above helps, take the following troubleshooting steps:
Add View Results Tree listener as a child of the HTTP(S) Test Script Recorder. In case of any problems with the recording a request it should display the error details.
Check your mobile device logs during failed certificate installation attempt. You may need to install Android and iOS developer tools for this.
Make sure that your application is really uses HTTP or HTTPS protocols as JMeter supports only these 2.

Resources