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

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.

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.

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)

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

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.

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.

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.

Resources