Creating an Effective Load Testing Script with JMeter: Best Practices and Step-by-Step Guide

Apart from API load testing in JMeter we can also record script and apply load on that script for further testing.

We can do this task in two parts — 

  1. Record Script Using BlazeMeter.
  2. Import recorded script into JMeter and apply load on it.

Record Script using BlazeMeter

First of all we have to install BlazeMeter extension in our browser by tapping on this link and click on ‘Add to Chrome’ button. At the top right side corner of your browser an extension icon appears and inside it if you see an icon with Capital B in it then BlazeMeter extesnion is successfully added in your browser, pin it on right side of search bar by tapping on pin icon. It should look something like this — 

BlazeMeter Extension Added

After extension is successfully added you have to create an account by clicking on Sign Up button. This will redirect you to the official site of the BlazeMeter where you can register yourself with your email.


Steps to record Script — 

After registering, by entering the test name(you can give name of your choice) you can start recording the script by clicking on the Start Recording button, red and in shape of circle.

Test Case Name and Start Recording Button

Now open the web application URL and perform web actions which you want to record.

You can also pause/resume your recording by clicking on pause/resume recording button.

Pause/Resume Recording

After you finish recording, you can tap of Stop recording button.

Stop Recording button

As soon as you stop recording, BlazeMeter icon starts blinking and save button appears.

Download/Save Script

Now click on Save button and select script type to JMeter(JMX), you can also select the domains which you want to include into the JMX file.

Domain selection

After Selecting domains, the Save button enables and by click on that JMX file will be downloaded.

Import recorded script into JMeter and apply Load on it

To import the downloaded JMX file into JMeter , open your JMeter go to File → Open and locate your downloaded file and select it. Finally click on Open button to open file into JMeter.

Import downloaded JMX file

Now we can simply apply load on that script by tapping on Thread Group — 

Load on Script

Finally you can press on Run button and see the behavior of recorded script in the listeners (View Result Tree and Aggregate Report).


Latest

SENTRY integration in your React Native App for Error/Crash tracking

Sentry captures data by using an SDK within your...

Recall the concepts of useCallback.

useCallback hook is one of the best hooks offered...

Value of Comments in the code!!

During my journey of Software Development, I am always...

YOLO:Bullet Paced Algorithm

http://sh017.hostgator.tempwebhost.net/media/33949d0e61af4b50f374c534713f56b3 According to world health organization, more than 1.35 million...

Featured

Developing Enterprise Application in Node.js – CJS Vs ESM

Node.js is a popular runtime environment for building server-side...

Integrating your web react applications with their React Native(android and IOS) apps using QR code

Integrating a web application with Android and iOS apps...

YOLO: Bullet Paced Algorithm – popular choice for object detection in autonomous vehicles 

According to world health organization, more than 1.35 million...

How to use JMeter for APIs Load testing?

Things you will learn in this article —  1. How to install the JMeter in you system?2. How to setup JMeter for API load testing? Installation of JMeter Steps...

LEAVE A REPLY

Please enter your comment!
Please enter your name here