Unable to test mobile application using Test Script Recorder - jmeter

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.

Related

JMETER recording issue with VPN

We are trying to record UI based Application in JMETER for the public network and made proxy settings accordingly in Firefox browse with valid certificate.
But with VPN, we could not be able to record that UI application and we are getting below error.
we made changes to proxy configuration too as suggested by our infra team in Firefox browser and in JMeter tool, but we could not able to record at all public network UI application.
There should not be any issue with recording the applications which are being the VPN because Java relies on operating system routing mechanisms in order to find the best way to the system under test.
Just make sure to start the HTTP(S) Test Script Recorder after connecting to the VPN and don't forget to import JMeter's certificate into your browser.
In case of any problems check what's in jmeter.log file - it should contain the failure reason.
Also be aware of an alternative way of recording a JMeter test: JMeter Chrome Extension, in that case you won't have to worry about proxies, certificates and VPNs.

How to record native iOS app requests in 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

Jmeter script Recording

What is the purpose of JMeter Recorder? With Work Bench, how can I record a Script for Android Native application? I need to record a Script for Native application, is that possible, and how can find errors for Tested Application? What is the procedure to do?
Thanks in advance.
If your application is using HTTP or HTTPS protocols you can record its network activity using JMeter's HTTP(S) Test Script Recorder
First of all make sure JMeter and Android device are on the same network (i.e. connected to the same Wi-Fi) and the machine running JMeter is not blocking port 8888 in the firewall
Prepare JMeter for recording. The fastest way is using JMeter Templates feature. From JMeter's main menu choose File -> Templates -> Recording -> Create, expand Workbench -> HTTP(S) Test Script Recorder and click Start button
Optional step (if your application is using HTTPS only). Locate ApacheJMeterTemporaryRootCA.crt file under JMeter's "bin" folder, send it to yourself by email, open the email on Android device and install the certificate from the attachment
Configure Android device to use JMeter as a proxy. Use IP address or hostname of machine running JMeter as a proxy host and 8888 as a proxy port. Depending on your application network transport and Android version you may have to use a 3rd-party tool like Proxy Droid to set up the proxy configuration
Start your application - JMeter should capture the network requests under the Recording Controller.
In case if you experience any problems update the question with the exact errors. Also it worth checking out A Step by Step Guide to Performance Testing on Native Mobile Apps for an alternative solution.

How to record a Script By using JMeter

when i change the proxy settings the Save button is not getting enable, can anyone help me to to record the script by for Android Application.
please share Videos to Record a script for android.
Thanks In Adavance.
Make sure your Android device is connected to the same network as the machine running JMeter
Prepare JMeter for recording, the fastest and the easiest way is using templates feature, from JMeter's main menu choose File -> Templates -> Recording -> Create
Expand Workbench -> HTTP(S) Test Script Recorder and click "Start"
Configure your mobile device to use JMeter as a proxy, use IP address or hostname of machine where JMeter is running as proxy host and 8888 as proxy port
If application you're trying to record is using HTTPS transport you will need to import JMeter's self-signed certificate onto the device. Locate ApacheJMeterTemporaryRootCA.crt file (it is being generated in JMeter's "bin" folder when you start HTTP(S) Test Script recorder) and send it to yourself via the email. Once done - open the attachment on the Android device and follow installation dialog. You may also need a 3rd-party tool like ProxyDroid in order to configure HTTPS proxy.
See Load Testing Mobile Apps Made Easy guide for comprehensive instructions.

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