Receiving this error while doing performance testing via Jmeter for mobile app.**ensure browser is set to accept the JMeter proxy certificate** - jmeter

I am testing performance of mobile app via jmeter for android mobile app. FOr most of the apps installed in my mobile device, I am receiving below error message.
Software caused connection abort: recv failed
ensure browser is set to accept the JMeter proxy certificate.
Please help me to know how to resolve this error, while testing with mobile app.

Well have you done what the error message says e.g. have you installed the JMeter CA certificate ? look at this guide and check if you have followed the steps correctly [Apache JMeter HTTP(S) Test Script Recorder] (https://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf) especially this step :
Return to HTTP(S) Test Script Recorder, and click the “Start” button at the bottom.
This will start the JMeter proxy server which is used to intercept the browser requests.
A file called ApacheJMeterTemporaryRootCA.crt will be generated in jmeter/bin folder.
Install this certificate in your browser, if you don't know how to do it, read “
Installing the
JMeter CA certificate for HTTPS recording
” in : http://jmeter.apache.org/usermanual/component_reference.html#HTTP%28S%29_Test_Script_Recorder

When you start JMeter's HTTP(S) Test Script Recorder it generates a dummy certificate in order to be able to decrypt SSL traffic.
Locate ApacheJMeterTemporaryRootCA.crt file in JMeter's /bin folder (it may live in other location if you run JMeter i.e. from desktop shortcut)
Install it onto your device (the easiest way is sending it to yourself via email, open the email on device and click on the attachment)
After certificate installation device should be
You may find Mobile Recorder service easier to use

Related

java.net.SocketException: Connection reset on JMeter

i am trying to automate the web process and that website only access when i am using VPN so when i try to Record the Website Script using the JMeter Script recoder then i shows error " You connection is not Private for this site " and when i am trying to run the JMeter as a Proxy server by using this command jMeter.bat -H -P -N -u -a then i am getting " java.net.SocketException: Connection reset " Error. So if anyone know how to recode the VPN accessed web application test script in JMeter please help me.
Thanks and Regards
"You connection is not Private for this site" error means that you haven't imported JMeter's certificate into your browser.
When you start JMeter HTTP(S) Test Script Recorder it generates a special certificate file called ApacheJMeterTemporaryRootCA.crt in "bin" folder of your JMeter installation, the certificate allows JMeter to intercept and decrypt HTTPS traffic so make sure to import the certificate into your browser before opening the page of the application you're testing.
More information:
HTTPS recording and certificates of HTTP(S) Test Script Recorder user manual entry
Recording HTTPS Traffic with JMeter's Proxy Server
if you're still seeing the error - try clearing your browsing history as it might be the case your browser "remembers" valid certificate for the page you're trying to open and detects certificate mismatch when you're opening it via JMeter's proxy.
With regards to VPN I don't think any extra steps are required once you're able to open the application with browser and/or JMeter

Unable to login into OKTA application when using jmeter's recording controller (proxy)

I'm able to login into the OKTA application, when I'm NOT recording the jmeter script using jmeter's proxy server(using Test Script Recorder). But, as soon as I setup my browser to use jmeter's proxy server (Test Script Recorder) for recording, I'm NOT able to login into the application itself. I see error "Please try your request later.The system is having techical difficulties". But the application works fine without proxy and i am able to login to OKTA application.
Steps:
Open jmeter. In test paln add test script recorder and change the browser IE Lan settings port to 8888 which is specified in the recorder.
Launch Application.
Give username and click on next
Error is encountered. "Please try your request later.The system is having techical difficulties"
But it works fine when i launch the application without any proxy.
Most probably you need to import JMeter's self-signed certificate into your browser, the file is called ApacheJMeterTemporaryRootCA.crt and it's being generated in "bin" folder of your JMeter installation when you start JMeter proxy server.
See HTTPS recording and certificates chapter of the HTTP(S) Test Script Recorder documentation for more detailed explanation.
Remember when something goes wrong most probably you can find a clue in jmeter.log file
There is an alternative way of recording a JMeter test: JMeter Chrome Extension, in this case you won't have to worry about proxies and certificates, just execute your use case in browser and once done you will be able to export the recorded script in form of JMeter .jmx file
This probably is due to the way Jmeter is parsing(and resending) the OKTA data(token, response etc.).The data parsed and sent by Jmeter proxy is unacceptable by the server and hence the error.Try saving the .har and then convert to jmx for jmeter use and see the difference.
Using Jmeter extension on Chrome might help too for recording.

Jmeter Script recording not recording

The recorded the script and it was working on windows 7 machine. But now the script is not getting executed correctly in windows 10. The result is passed but aftual executions is not taking place. Also I tried to record new script on windows 10 but the script is not getting recorded. I am using the latest jmeter version. Could you please help me.
Jmeter should work fine on windows 10.
Cross check if you are able to access application (with or without proxy). If application is accessible through proxy, you need to open jmeter with proxy command.
Ensure you imported jmeter root certificate in browser.
You need to import JMeter's self-signed certificate into your browser. The file is called ApacheJMeterTemporaryRootCA.crt and it's being created in "bin" folder of your JMeter installation when you start HTTP(S) Test Script Recorder.
Check HTTPS recording and certificates chapter of the above article for the exact steps of certificate installation for different browsers.
Mozilla Firefox and derivatives have their own certificate storage, other browsers use Windows certificate storage, you can inspect it using Certificate Management Tool
If JMeter's certificate is not there - you will need to install it.
Be aware that there is an easier way of recording a JMeter test which doesn't require configuring proxies or installing certificates: JMeter Chrome Extension, just install it, start recording and perform your scenario steps in browser

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.

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.

Resources