NET::ERR_CERT_AUTHORITY_INVALID Error with Chrome 66 using Apache JMeter as Proxy - jmeter

Above mentioned privacy error is displaying while I tried to record some scenarios in Apache JMeter 4.0. I have installed ApacheJMeterTemporaryRootCA certificate in my local bin path of JMeter folder and imported in Trusted Root Certification Authorities folder in chrome.
And myself using Chrome : Version 66.0.3359.27 (Official Build) dev (32-bit) to recording purpose in JMeter. Also given 8080 as a port number in both proxy settings in chrome and JMeter - Test Script Recorder.
Still can't understand why I can't record several actions, as I did same thing in previous versions of Apache JMeter. So please let me know the solution for it.

You can use the following workarounds:
Just type badidea anywhere in the page and you will be able to proceed.
Launch Chrome with --ignore-certificate-errors command-line argument
Switch to alternative way of recording a JMeter test using i.e. JMeter Chrome Extension, in this case you won't have to worry about configuring proxies and/or SSL certificates.

Related

Jmeter certificate not working in most sites

After I installed the Jmeter Certificate I still see error for missing certificate. I can access few sites which I couldn't before installing the certificate, but still in most sites I get the error. I use FireFox and Jmeter 5.4.1. How to fix this errors after I already have installed certificate?
Your "not working" statement doesn't tell the full story, I can think of one possible reason:
You visited a web site over HTTPS protocol before installing JMeter's certificate
You're trying to open the same web site after installing JMeter certificate
Firefox detects certificates mismatch and prevents the website from opening
The easiest solution is to completely delete your browsing history or if you don't want to do this create a new "clean" Firefox profile which will be used just for recording purposes.
More information: Recording HTTPS Traffic with JMeter's Proxy Server
Also be aware of JMeter Chrome Extension, in this case you won't have to worry about proxies and certificates.

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 record application running on local host in Internet explorer using JMeter Test script recorder

I am trying to do record a test script using JMeter (version 4) Test Script Recorder for performance testing of my application. After configuring the proxy, The recorder is not recording my application URL running on localhost in Internet Explorer (IE 9). But other URLs are getting recorded in JMeter. I tried to record my application using Chrome which is working fine.I have unchecked the Bypass proxy server for local address in Proxy settings.
I recommend you to use Mozilla Firefox to record your script because Firefox allows you to manage proxies and certificates independently of system settings.
Get more information about recording:
Apache JMeter HTTP(S) Test Script Recorder
JMeter Recording Guide
Make sure to check Use the same proxy server for all protocols box in the "Advanced" tab of the Internet Explorer proxy settings and there are no localhost, 127.0.0.1, etc. in the "Exceptions"
Some applications cannot route traffic to a local proxy server so you may need to add a loopback adapter
If you're recording an application which operates over HTTPS protocol you will need to install JMeter's self-signed certificate into Trusted Root Certification Authorities:
It doesn't really matter which browser you're using for recording as applications mostly differentiate the browsers basing on User-Agent header so you can record using whatever browser and then change User-Agent string in the HTTP Header Manager to IE9
According to JMeter Best Practices you should always be using the latest version of JMeter so consider upgrading to JMeter 5.0 (or whatever is the latest version available at JMeter Downloads page)

JMeter : How to record HTTPS traffic?

I'm using Apache JMeter 2.3, which now supports "attempt HTTPS spoofing" under the Proxy Server element.
I've tried this on several different servers, and have had no success.
Has anyone been able to successfully record from an HTTPS source with this setting?
Or barring successfully recording, can anyone share a work-around? When available, I simply have HTTPS turned off at the server level, but this is not always feasible. Thoughts?
Starting from JMeter 3.0 default port for the HTTP(S) Test Script Recorder is 8888
The easiest way to configure recording is using JMeter Templates feature. From JMeter's main menu select:
File -> Templates -> Recording -> Create
Don't forget to start the recorder :
In JMeter < 4.0, Expand "Workbench", if >= 4.0, ignore this step
Select "HTTP(S) Test Script Recorder"
Click "Start" button
You will see a message regarding Root CA Certificate. Click OK:
it is OK, it informs you JMeter has created a Root Certificate Authority that you need to import in your browser to be able to record correctly HTTPS traffic.
To Import this Root CA certificate in Firefox (it is located in jmeter/bin folder) for example:
Configure browser to use JMeter as proxy:
It is now Ok.
You can navigate to your application, samplers will be created under "Recording Controller" which is under "Thread Group" element
While the JMeter proxy already has the ability to record HTTPS requests, a Chrome Extension that creates JMeter script came out recently:
https://chrome.google.com/webstore/detail/blazemeter-the-load-testi/mbopgmdnpcbohhpnfglgohlbhfongabi?hl=en
It uses a BlazeMeter as the middleman (a commercial JMeter in the cloud service) but you can use their free service forever and still use the plugin to record a JMX script and download it locally to your own machine even if you never use any of the paid plans.
What I do is:
Go to my website using my web server's IP-address (i.e. http://2.2.2.2/login.html)
Start the recorder and run through my test case
Stop recording
Replace all values of the IP address with the domain name (i.e. replace 2.2.2.2 with yoursite.com) from the HTTP Request Samplers
Set the protocol to https in the HTTP Request Samplers
If you have more than a few pages, it's easiest to create an HTTP Request Defaults item, and set your domain name and protocol there.
FYI, I'm using the latest stable build as of 2010-05-24: Jmeter 2.3.4 r785646.
The newest version of Jmeter (2.4) now supports HTTPS recording. Rejoice!
More details:
http://wiki.apache.org/jmeter/JMeterFAQ#Can_JMeter_record_HTTPS_requests_using_the_recording_proxy.3F
Is there any other way to record HTTPS than Bad boy and Https spoofing?
Yes--use a nightly build of JMeter, e.g. version r922204.
Https recording is successfully working in new version of Jmeter 2.9 as of today. I had to import proxy certificate and play around with Firefox to get this working.
Refer this link for more information
Https recording using Jmeter
Yes, I have used it with "attempt HTTPS spoofing" on. Things are simple enough:
Turn HTTPS Spoofing on (of course).
Make sure that the browser sends Http request to Jmeter, so that Jmeter can record it and then send the encrypted request back to the server. So, the URL in the browser should start with http:// (and not with https://). The details could be found in my blog.
Please let me know if it works for you.
I am using Webscarab to record https and ajax conversations.
It workd fine. I extended the Webscarab with export function for Jmeter.
Bugzilla 48898.

JMeter "Content encoding Error" when using FireFox and HTTP(S) Test Script recorder

I am trying to configure Mozilla Firefox for JMeter 5 and as I am setting up manual proxy in Firefox and same proxy number in JMeter.
I installed the special certificate.
My Firefox is showing error as "Content encoding Error", when I open https://www.google.com website.
This is due to Brotli Encoding not being supported by JMeter Test Script Recorder in versions <= 5.0.
See:
https://bz.apache.org/bugzilla/show_bug.cgi?id=62842
The bug is now fixed in nightly build and in upcoming 5.1 version of JMeter.
To workaround, in Firefox, type about:config and input Content-Encoding:
Then remove br from the algorithms accepted.
Don't load test public applications unless you're a member of their QA team or have an explicit permission from the application owner. Most probably you will be at least stopped by DDoS protection mechanisms and your IP will be simply blacklisted which may cause problems for your neighbours if you're behind an ISP NAT.
Whenever JMeter fails to record something try out an alternative way - JMeter Chrome Extension which is a convenient way of intercepting browser traffic without having to configure proxy servers and installing certificates.

Resources