Recording a JMeter test

Contents
Introduction
Preparing the plan
Browser proxy setup
Certificate import
Recording
Related articles

Introduction

In this article you will learn how to record a test with JMeter GUI and the Firefox browser.

Only the bare minimum of elements is added, to keep the focus on recording itself. Later you will need more elements and a slightly more complex recording setup.

Preparing the plan

An empty plan looks like this:

Recording a test in JMeter, image from www.andreyolegovich.ru

Let us add the most essential elements manually, one by one

Instead of adding elements manually you can use the Recording template

As usual, right-click the plan and choose Add → Threads (Users) → Thread Groups

A Thread Group with a gear icon appears under the plan.

To record a test you need to add an HTTP(S) Test Script Recorder

Right-click the plan → Add → Non-Test Elements → HTTP(S) Test Script Recorder

Recording a test in JMeter, image from www.andreyolegovich.ru

The HTTP(S) Test Script Recorder settings look like this:

HTTP(S) Test Script Recorder settings in JMeter, image from www.andreyolegovich.ru

Note the Port. JMeter will listen for traffic on it. Let us change it to 8877 for clarity and remember the value.

HTTP(S) Test Script Recorder settings in JMeter, image from www.andreyolegovich.ru

The preliminary plan setup is done. Next step - configure the browser to use port 8877 as a proxy.

Browser setup

Download and install Firefox - read here where to get it.

Other browsers do not allow a proxy just for themselves.

Open Firefox . In the top right corner click the menu icon and choose Options. Or just click the gear icon.

Recording a test in JMeter, Firefox setup, image from www.andreyolegovich.ru

Scroll down to Network Settings and click Settings…

Recording a test in JMeter, Firefox setup, image from www.andreyolegovich.ru

Choose Manual proxy configuration, change the port to 8877 and check Also use this proxy for FTP and HTTPS (you may also see «Use this proxy for all protocols»)

Recording a test in JMeter, Firefox setup, image from www.andreyolegovich.ru

Make sure the No Proxy for field has nothing extra. If you see this field for the first time - just clear it.

Recording a test in JMeter, Firefox setup, image from www.andreyolegovich.ru

If you plan to test on localhost - read the article «Proxy for localhost» if you will test on another machine or over the internet - keep reading this article.

Certificate

The browser needs a certificate. This section explains how to get and use it.

Back in JMeter, in the HTTP(S) Test Script Recorder change Target Controller to Test Plan > HTTP(S) Test Script Recorder

Recording a test in JMeter, Firefox setup, image from www.andreyolegovich.ru

Recording a test in JMeter, Firefox setup, image from www.andreyolegovich.ru

Now the plan is finally ready to record. Note the contents of the apache-jmeter-X.X\bin folder

Recording a test in JMeter, certificate setup, image from www.andreyolegovich.ru

No certificates there yet.

Go back to JMeter and click Start

Recording a test in JMeter, certificate setup, image from www.andreyolegovich.ru

A certificate creation message appears. Click OK

Recording a test in JMeter, certificate setup, image from www.andreyolegovich.ru

A new window appears

Recording a test in JMeter, certificate setup, image from www.andreyolegovich.ru

Note the contents of the apache-jmeter-X.X\bin folder

Recording a test in JMeter, the bin folder has certificates, image from www.andreyolegovich.ru

The certificates are there.

Go back to the Firefox settings. Search for certificates. Click View Certificates

Recording a test in JMeter, the bin folder has certificates, image from www.andreyolegovich.ru

Click Import

Recording a test in JMeter, the bin folder has certificates, image from www.andreyolegovich.ru

Select the certificate

Recording a test in JMeter, the bin folder has certificates, image from www.andreyolegovich.ru

Close the browser and stop the recording by clicking Stop. Make sure this window is closed.

Recording

In JMeter click Start and OK in the certificate window.

Recording a test in JMeter, certificate setup, image from www.andreyolegovich.ru

Open Firefox

Recording a test in JMeter, Firefox setup, image from www.andreyolegovich.ru

Go to any website, for example https://www.heihei.ru/fly/

Recording a test in JMeter, Firefox setup, image from www.andreyolegovich.ru

Enter a destination city, for example Malaga and click «Find tickets». Note how long the search takes.

Recording a test in JMeter, Firefox setup, image from www.andreyolegovich.ru
Recording a test in JMeter, Firefox setup, image from www.andreyolegovich.ru

In JMeter click Stop and then the triangle next to HTTP(S) Test Script Recorder

Recording a test in JMeter, Firefox setup, image from www.andreyolegovich.ru

A tree of all recorded actions expands

Recording a test in JMeter, Firefox setup, image from www.andreyolegovich.ru

The test is recorded. Read how to process it in the next article «Processing a recorded test»

Article author: Andrei Olegovich

Related articles
JMeter
Install on Windows
Install on Linux
Recording a test
Processing a recorded test
Software Testing
Where to Study QA
API testing lessons for beginners
API Testing
Test Automation
Selenium
Playwright
SOAP UI
JUnit
Java

Search this site

Subscribe to Telegram channel @aofeed to follow new articles and updates to old ones

Go to channel

@aofeed

Ask a question in the Telegram group

@aofeedchat

Contacts and cooperation:
I recommend our hosting beget.com
Write to info@aredel.com if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: