Unable to record in Jmeter using Mozilla Firefox browser - jmeter

While recording a https application from Jmeter by using Mozilla Firefox am getting a popup in the browser with title as 'This site is asking you to sign in.' with text box for username and password.
Not sure if we need to provide proxy - username/password (or) application - username/password here, tried both, but again and again getting the same popup and upon clicking on cancel in the popupp it shows 401-Unauthorised
Note:
Working fine from mozilla forefox when proxy is "Use system proxy settings". above issue exists only when proxy is "Manual Proxy Configuration" and recording from Jmeter.
Jmeter was lanched from cmd by providing proxy details.
jmeter certificate was installed in mozilla firefox.

Try specifying username, password and your domain in system.properties file (lives in "bin" folder of your JMeter installation)
http.proxyUser=username
http.proxyPass=password
http.proxyDomain=your_domain
as it might be the case your corporate browser is configured to automatically login to the website using the account of the currently logged in user (the approach is known as SSO)
See Using JMeter behind a proxy article for more information.
Also be aware of alternative way of recording a JMeter test: JMeter Chrome Extension, in this case you won't have to bother about proxies and certificates as the extension is less "invasive" than JMeter's MITM proxy

Related

JMeter - "Empty response to http over SSL. Probably waiting for user to authorize the certificate "

I am entering my user id and password for a https site that i am trying to record using JMeter's test script recorder element. On entering my user id and password, I get an error. When looking into the logs, I see the below error.
"Empty response to http over SSL. Probably waiting for user to authorize the certificate for XX.XX:443".
I have added the certificate in the browser. I am only having issues with a specific website alone and any other https website seem to be working fine.
I am using JMeter version 5.
Any help or guidance is appreciated. Thank you.
John
Tried importing new certificate
Tried Java,Httpclient4 type to record the flow.
You have to authorize JMeter certificate to browser which you are using. If so, go through this steps and look if you missed something:
Press Start record in HTTP(S) Test Script Recorder.
You should get this message:
Start Firefox
Open Firefox Menu
Go to "Options"
Go to "Privacy & Security"
Click "View Cerificates"
Ensure there are no certificates with names "_DO NOT INSTALL..", "DO NOT INSTALL..",
"JMETER.." and other related to JMeter cerificates, or Delete them if they are present.
Click "Import" to add new certificate.
Navigate to your JMeter bin directory and choose ApacheJMeterTemporaryRootCA.crt file.
Check Trust this CA to identify websites.
Press Ok.
Do actions with your web application to record requests.
Most probably something is wrong with your browser configuration, i.e. old JMeter certificate is present somewhere in the certificates storage. Few things to consider:
Clear your browsing history.
Consider using a browser which has separate proxy and certificates configuration, for example Mozilla Firefox
Delete proxyserver.jks and ApacheJMeterTemporaryRootCA.crt files from the "bin" folder of your JMeter installation. The files will be regenerated next time you start the HTTP(S) Test Script Recorder
Import the newly generated ApacheJMeterTemporaryRootCA.crt file into the browser
Be aware that as of now certificate lifetime is limited to 7 days so you will have to regenerate it and reimport prior to using again for recording. The certificate life span is controllable via proxy.cert.validity property
Also be aware of an alternative way of recording a JMeter test script: JMeter Chrome Extension, in this case you will not have to worry about proxies and certificates.

How to load test https with JMeter

I have read documentation on how to use recorder, I have setup proxy on Firefox 64.0, added certificate that was generated by JMeter, but when I navigate to https://www.google.com, I am getting Your connection is not secure error on firefox, I disabled it in firefox settings, but it keeps throwing me that message, how can I disable it and be able to record actions in google.com?
You need to clear your browsing history, to be absolutely sure you can remove everything since the beginning of the time.
If the history is "valuable" you can create a new Firefox profile for using it solely for recording.
Another option is to "forget" about the website you're trying to record:
Once done you should be able to add the exception and proceed with the recording:
Check out Recording HTTPS Traffic with JMeter's Proxy Server article for more comprehensive information and more troubleshooting tips.

Proxy setting for jmeter not working properly

I am trying to set up proxy in firefox so that I can use recoding controller from Jmeter GUI. Below is my network settings in firefox:
and also the jmeter GUI:
But when I try to load my site in firefox, I am getting the following error:
The owner of app.example.net has configured their website improperly.
To protect your information from being stolen, Firefox has not
connected to this website.
This site uses HTTP Strict Transport Security (HSTS) to specify that
Firefox may only connect to it securely. As a result, it is not
possible to add an exception for this certificate.
Learn moreā€¦
Report errors like this to help Mozilla identify and block malicious
sites
Any help will be highly appreciated.
Try running Chrome with --ignore-certificate-errors following Recording stops due to HSTS answer in JMeter group:
Recording stops due to HSTS
Lily Nguyen
5 posts
I had the same issue with JMeter 3.2 , using Chrome. I got it resolved by
invoking Chrome from command line with flag --ignore-certificate-errors
...This would get rid of the "Your connection is not private" error and i
was able to record normally after installing the certificate everywhere
Or record site with Blazemeter Chrome extension
This is not a JMeter problem, this is a technique of protection against MITM attacks called HTTP Strict Transport Security
You can try to bypass it by
Remove entry for your app.example.net from the SiteSecurityServiceState.txt file in the Firefox Profile folder
Add the next Integer value at about:config page:
test.currentTimeOffsetSeconds= 11491200
Clear your browsing history or start with the new Firefox profile
Be aware that there is an alternative way of recording a JMeter test: JMeter Chrome Extension, you will not have to worry about proxies and certificates, just execute your scenario in the browser and once done you will be able to export it as a JMeter test script.

Jmeter recording feature capture different URL than what is provided in HTTPS domain

Whenever I try to use Jmeter recording functionality for the website, the requests send to website are captured but the name of website is different and body data is encrypted.
Jmeter always shows request for : ocsp.comodoca.com, ocsp.digicert.com, ocsp.pki.goog. But these are not the URLs provided for HTTPS Domains in Test Script Recorder.
I checked on the Internet that ocsp.comodoca.com, ocsp.digicert.com, ocsp.pki.goog provide SSL certificate. But why those are seen in Jmeter request are not known to me and how to see the URL for my test website? Thanks.
HTTPS Test Script recorder
Junk Request
I was also facing the same issue while recording with JMeter. I later found the issue had to do with the way I had setup the proxy options in Firefox.
I had forgotten to select the check box `Use this proxy server for all protocols. After selecting this check box, I was able to record my actual server URLs.
You're looking into wrong feature, the setting you should be using lives at Requests filtering tab of the HTTP(S) Test Script Recorder.
There is "URL Patterns to Exclude" input where you can filter out "not interesting" domains by providing a Perl-5-style regular expression, i.e. .*ocsp.*
See Excluding Domains from the Load Test article for more details if needed

Cannot get JMeter to authenticate against site during recording

I am new to Jmeter and have the following problem. It has wasted a couple of days for me so far and I really hope someone can help:
When I go to record the login page of the website (IIS hosted, Windoes Authentication) I ultimately receive a 401 unauthorized. The login popup shows again after details have been entered. These same details function correctly when browsing to the site without the use of Jmeter.
Situation:
Intranet Proxy > JMeter Proxy > Site
I have started JMeter with the Intranet Proxy details:
jmeter -H -P 8080 -u -a -N localhost
I have created a HTTP Proxy Server in the WorkBench within JMeter
HTTP Sampler Settings = HttpClient 3.1 / Redirect / Follow and Keep Alive
I have added a HTTP Authorization Manager to the Thread Group providing my details
I have uncommented httpclient.parameters.file=httpclient.parameters in the jmeter.properties file
I have uncommented http.proxyDomain=NTLM domain, if required by HTTPClient sampler in the same file
I have uncommented http.authentication.preemptive$Boolean=true in the httpclient.parameters file
I believe the NTLM credentials are getting lost somewhere along the way but I do not know where to go at this point.
Let me know if any other information would be of use.
Thanks in advance,
Eoin.
If you are behind a proxy which requires authentication, ensure you set this:
-H PROXY_HOST -P PROXY_PORT -u PROXY_USERNAME -a PROXY_PASSWORD -N localhost
Second check your configuration of JMeter Proxy JMETER PROXY SETUP STEP BY STEP
Finally if you have NTLM, then it's not sure it can work at least not sure during recording, it also depends on your version of NTLM, see this:
http://jmeter.512774.n5.nabble.com/JMeter-NTLM-authentication-td514319.html
See this:
JMeter with Windows Authentication?
Finally try asking this question on jmeter user mailing list, once you don't get answer,
I suggest you put JMeter in DEBUG mode (jmeter.properties) and attach your logs to a BugZilla issue you will open on this (I will look at it as soon as possible).
Works for me in Firefox 40 and IIS with Kerberos authentication if I set HTTP(S) Test Script Recorder -> HTTP Sampler settings -> Type = Java. Need to type the authentication in multiple times, then when I cancel out Firefox is authenticated and I can record the site no problem.

Resources