Video 1. JMeter Beginner Tutorial 23 - How to use Test Script Recorder (YouTube link)
This article will cover the details of recording HTTP/HTTPS traffic with Firefox (FF) in Apache JMeter. To achieve that, you can use a workbench with HTTP(S) Test Script Recorder. If you are new to JMeter, watch the above video first.
"Recording" Template
The easiest way to create a complete Test Plan with the HTTP(S) Test Script Recorder is using Recording Template:[1]
- Go to JMETER_HOME/bin and start JMeter
- Select Templates... on the menu bar
- Select Recording template on the list
- A complete Test Plan is generated (see the diagram below)
In the HTTP Request Defaults element, you can optionally set "Server name":
- Server name
- enter example.com
- Path
- leave blank
JMeter Temporary Root CA
Return to HTTP(S) Test Script Recorder, and click the Start button at the top.
Note that you need to "Configure your browser to use the JMeter Proxy" (see the section below) first. For the discussion only, we will show you the "JMeter Temporary Root CA" first.
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 and you will find a prompt showing below messages:
Installing the certificate in Firefox for HTTPS Recording
If you're recording SSL/TLS traffic (i.e., your site URL has https prefix), you need to install the certificate (i.e., ApacheJMeterTemporaryRootCA.crt) in your browser. So, JMeter could record encrypted traffic. If you don't know how to do it, read Installing the JMeter CA certificate for HTTPS recording first.
For the Firefox (or FF) browser, you choose the following options (note that the configuration looks different in different FF versions):
- Tools / Options
- Advanced / Certificates
- View Certificates
- Authorities
- Import …
- Browse to the JMeter launch directory, and click on the file ApacheJMeterTemporaryRootCA.crt, pressOpen
- Click View<
and check that the certificate details agree with the ones displayed by the JMeter Test Script Recorder - If OK, select "Trust this CA to identify web sites", and press OK
- Close dialog by pressing OK as necessary
After import, you can find a new entry on the Authorities list as shown below:
Configure Your Browser to Use the JMeter Proxy
Like many other web testing tools, JMeter records tests by inserting itself as an HTTP proxy between the browser and the web site. We use FF as our browser when using the JMeter HTTP(S) Test Script Recorder because, unlike Chrome and some other browsers, it does allows you to override system-wide configuration for its proxy settings (see also [8]).
Configure Firefox to use localhost (127.0.0.1) on port 8080 (Note that you also need to set the Port to be 8080 in HTTP(S) Test Script Recorder) as its proxy for all traffic by following these steps:[7]
- Open Firefox
- Go to the Preferences menu
- From the tool bar, click about:preferences#advanced as URL). This should bring up the options. (or or type
- Click on the Advanced tab
- Then Network tab
- In the "Connection" section, click on "Settings..."
- Select the "Manual proxy configuration" radio button
- Set HTTP Proxy to "localhost" and Port to "8080"
- Check "Use this proxy server for all protocols"
- Click OK and exit the Preferences menu
Note: When Firefox is configured to use JMeter's Script Recorder as a proxy, it will only work properly if the Script Recorder is running.
Recording Tips
When you record, you may want to consider the following extra configurations:
- Follow Redirects vs Redirect Automatically[3,4]
- Set in HTTP Request sampler
- Redirect Automatically, will not consider redirect as a separate request (or sample) where as Follow Redirects will consider each redirection as a separate request.
- Enabling Follow Redirects will result in more requests which means comparatively higher response time
- Retrieve All Embedded Resources from HTML Files
- Set in HTTP Request sampler
- Tell JMeter to parse the HTML file and send HTTP/HTTPS requests for all images, Java applets, JavaScript files, CSSs, etc. referenced in the file.
- Firefox Data Collection and Use
- Type about:preferences#advanced as URL in FF
- Disable the following option found in FF 56.0
- This will reduce spurious traffic being recorded.
- Similarly, it is advised to close all other browsers (i.e., IE, Chrome, etc) except the one (i.e., FF) you use for recording.
- Use the Transaction Controller[5]
- To generate a “virtual” sample representing a real page to measure aggregate times of all nested samples (i.e., embedded resources―images, styles, scripts, recordings or anything that seems like a separate request).
- Transaction controllers also provide scopes for JMeter test elements[10,11]
- URL Patterns to Exclude
- Set in HTTP(S) Test Script Recorder→
- If the following patterns were not excluded yet, set them manually:
- (?i).*\.(bmp|css|js|gif|ico|jpe?g|png|swf|woff|woff2)
- (?i).*\.(bmp|css|js|gif|ico|jpe?g|png|swf|woff|woff2)[\?;].*
- Post-recording updates of Test Scenarios
- JMeter—Use Extractors (Post-Processor Elements) for Correlation
- JMeter: How to Verify JSON Response?
- Multiple user logins in jmeter
- Prepare your click stream before recording
- Use timers to simulate a virtual user’s “think time”
References
- Apache JMeter HTTP(S) Test Script Recorder (Apache Software Foundation)
- Apache JMeter HTTP(S) Test Script Recorder (pdf)
- When to use “Follow Redirects” & “Redirect Automatically” while recording with jmeter
- Difference Between Redirect Automatically and Follow Redirects in JMeter
- JMeter―Using the Transaction Controller (Xml and More)
- JMeter Proxy exclusion patterns still being recorded
- How To Use JMeter To Record Test Scenarios
- Use the Profile Manager to create and remove Firefox profiles (Mozilla)
- A Comprehensive Guide to Using JMeter Timers
- JMeter Scoping Rules - The Ultimate Guide
- Scope and Execution Order of Elements in Jmeter
- JMeter Beginner Tutorial 21 - How to use Test Script Recorder (video)
Hulu offers a video streaming service in the Hulu app. You can watch favorite movies and TV shows on the Hulu channel. Everything you need to enter your Hulu account email address and password. It may ask you to set up Hulu com at hulu.com/activate, www.hulu.com/activate, hulu activate, hulu activation code.
ReplyDeletehulu.com/activate, www.hulu.com/activate, hulu activate, hulu activation code
Go to Office.com/Setup website www.office.com/setup us Sign In to your Microsoft Account Or Create a new Account. Enter your Product key Nonprofits can no longer download Microsoft Office products directly through the VLSC. Here's how nonprofits can download these products
Go to Office.com/Setup website www.office.com/setup us Sign In to your Microsoft Account Or Create a new Account. Enter your Product key Nonprofits can no longer download Microsoft Office products directly through the VLSC. Here's how nonprofits can download these products
ReplyDeleteAwesome blog. Thanks for sharing such a worthy information....
Angularjs Training in Bangalore
Angularjs classes in pune
Angularjs Training in hyderabad
Angularjs Training in Gurgaon
Angularjs Training in delhi
Angular Training in Trivandrum
Angular Training in Kochi
Angularjs Training in Ahmedabad
Angularjs Training in Kolkata
Best AngularJS classes in Mumbai
Wonderful post and more informative!keep sharing Like this!
ReplyDeletePHP Training in Bangalore
php classes in pune
php training in hyderabad
PHP Training in Gurgaon
php training in delhi
I am very happy to read this article. Thanks for giving us Amazing info. Fantastic post.
ReplyDeleteThanks For Sharing such an informative article, Im taking your feed also, Thanks.adobe-indesign-cc-crack/
ReplyDeleteI was looking for this information from enough time and now I reached your website it’s really good content.
Thanks for writing such a nice content for us.
2020/09/16/how-to-activate-windows-10
I am very happy to read this article. Thanks for giving us Amazing info. Fantastic post.
ReplyDeleteThanks For Sharing such an informative article, Im taking your feed also, Thanks.
pixarra-twistedbrush-pro-studio-crack/
ReplyDeleteI am very happy to read this article. Thanks for giving us Amazing info. Fantastic post.
Thanks For Sharing such an informative article, Im taking your feed also, Thanks.synthesia-crack-free-download/
Hi dear, It is really enjoyable to visit your website because you have such an amazing writing style.
ReplyDeleteDaossoft ZIP Password Rescuer
ReplyDeleteNice Blog!
https://crackedway.com/foxit-phantompdf-crack-latest/
I am very happy to read this article. Thanks for giving us Amazing info. Fantastic post.
ReplyDeleteThanks For Sharing such an informative article, Im taking your feed also, Thanks.
coolutils-pdf-combine-pro-crack/
ReplyDeleteI am very happy to read this article. Thanks for giving us Amazing info. Fantastic post.
Thanks For Sharing such an informative article, Im taking your feed also, Thanks.infix-pdf-editor-pro-crack/