Table of contents
1.
Introduction 
2.
Introduction to JMeter
3.
What is Distributed Load Test and Recording login test?
3.1.
Add Sampler
3.2.
Add Listener
3.3.
Save and Run
3.4.
Output
4.
Recording Login Test
4.1.
Downloading .JMX File
4.2.
Creating Test Plan
4.3.
Add Listener 
4.4.
Output
5.
Frequently Asked Questions
5.1.
What is JMeter?
5.2.
What is Blazemter?
5.3.
What is Distributed Load Test?
5.4.
What is a .jmx file?
5.5.
What are some features of JMeter?
6.
Conclusion
Last Updated: Mar 27, 2024

What is Distributed Load Test and Recording Login Test

Author Ayushi Goyal
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction 

Distributed Load Test and recording login test are two different test plans in JMeter. JMeter is an open-source and pure Java-based testing software. As the choices in real life vary from person to person, similarly different factors determine which type of testing needs to be performed. 

Introduction

Based on such factors, there are two types of tests - Distributed Load test and recording login test. In this article, we'll be discussing the difference between these two tests. 

Introduction to JMeter

Before we learn the difference between Distributed load test and Recording login test, we should have a quick recap of what JMeter is.

Jmeter

JMeter is a Java application developed by Stefano Mazzocchi. It is open-source testing software. JMeter can be used on any platform that accepts JVM(Java Virtual Machine). It was first introduced to test web applications. Later on, its use expanded to other functions. 

At present, it is used to load test functional behavior, measure performance on static and dynamic resources, and for database server tests. The steps to install JMeter on your systems:

Download JMeter
  • The files inside this folder look like this:
JMeter folder
  • Go to the bin folder and click on the jmeter.bat file to run JMeter. 
JMeter.bat file
  • The JMeter GUI(Graphic User Interface) will open. This look like this:
JMeter GUI

Now that we know what JMeter is and have also downloaded the JMeter let's see what is distributed load test and recording login test.

What is Distributed Load Test and Recording login test?

Distributed load testing uses multiple systems to perform testing. It is applied for testing the website and server application when multiple clients are working simultaneously. We need some web pages for testing distributed load test plan. So, we are taking three pages of Coding Ninjas' website. These are:

  1. Menu page - www.codingninjas.com
  2. Courses page - www.codingninjas.com/courses
  3. Career Camp page - www.codingninjas.com/careercamp
     

We will create our distributed load test and recoding login test using these web pages.  The steps for creating distributed load test plan are:

  • In JMeter GUI, click on the test plan name. 
  • Rename it to Distributed Load Test Plan. 
  • Right-click on this test plan and hover your mouse on the “Add” option.
  • Select Thread(User), and then Thread Group. 
add thread group
  • Now add HTTP (Hypertext Transfer Protocol) RequestsSampler to this Thread Group.

Add Sampler

To do so, follow the below-mentioned steps:

  • Right-click on the thread group.
  • Hover the mouse on the "Add" option.
  • Select sampler, and then HTTP Request. 
Add Sampler
  • Configure this HTTP request by giving the name and Server name or IP.

Name - Name of the web page. In our case, it is ‘Menu’. 

Server name or IP - your web server name. In our case, it is ‘www.codingninjas.com 

Our HTTP request will look like this:

HTTP Request
  • As we have taken three pages, so copy the thread group. And paste it into the test plan node two times.
     
  • Modify these two HTTP request samplers' names and server names or IPs. Also, specify their path names.  

For the second sampler

Name - Courses

Server name or IP - www.codingninjas.com/courses

Path name - courses

Sampler 2

For the third sampler

Name - Career Camp

Server name or IP - www.codingninjas.com/careercamp

Path name - careercamp

Sampler 3
  • The directory structure of distributed load test plan will look like:
Directory structure

Add Listener

Before saving and running the test, we need to add an aggregate report to see the results.

  1. Right-click on “Distributes Load test Plan”.
  2. Hover the mouse on the “ADD” option
  3. Select Listener and then the Aggregate report option. 
Add aggregate report

Save and Run

  • Go to File, and click on the “Save” option.
  • A pop-up window will appear similar to this:
Save and run
  • Save the test plan as a .jmx file. 
  • Go to the “Run” option. Click START or press Ctrl - R

Output

You can view the result in the Aggregate report. 

Output

From the distributed load test and recording login test, we are now left with the recording of a login test. HURRAY!!! Half of the work is done. Come on let’s complete the remaining part. 

Recording Login Test

For this, we need a chrome extension, BlazeMeter. The BlazeMeter reads all the HTTP requests made by the user and creates a JMeter script. This script can be used and downloaded to generate a .jmx file. You just need two clicks to add BlazeMeter as your chrome extension. These are:

Add blazemeter extension

 

  • Click on the “Add to Chrome” button to add the extension. 
  • Register on BlazeMeter - Register 
  • After this, you will be redirected to the demo test page.
Run demo test
  • Wait until the test is not completed. It may take a few minutes. 
  • The results will be displayed as:
Demo test result

To perform the login test, you need a publicly available website having successful login. We will be using the login page of the Coding Ninjas website. 

Login page

Downloading .JMX File

The steps for recording the login test are as follows:

  • Go to the login page.
  • Fill in your login credentials.
  • In BlazeMeter, give the name of the test as "Recording Login Test"
Give name to test
  • Now click on the red circle to start recording. 
Run blazemeter test
  • After login, stop recording. 
  • Now click on the "save" button.
  • Select JMeter(JMX) option and the domain we chose is codingninjas.com 
Select file type
  • You will get a .jmx file in the Downloads folder.
Download .jmx file

Creating Test Plan

  • In JMeter GUI, click on the test plan name. 
  • Rename it to ‘Recording Login Test’. 
  • Open the downloaded .jmx file. Go to File > open.
  • Locate the file and click Open.   
Open downloaded file
  • The directory structure of this file looks similar to the below image. It contains all the necessary files like variables, requests, cache, authorization, cookie, and header. 
File structure

Add Listener 

Before saving and running the test, we need to add a view result tree to see the results.

  1. Right-click on "Recording Login Test".
  2. Hover the mouse on the "ADD" option
  3. Select Listener and then the View Result Tree option.
  4. After this, go to Run and click Start to get results.   
Add view result tree listener

Output

After execution, you can view the result in the view result tree listener. 

Output

Now let’s see some frequently asked questions.

Frequently Asked Questions

What is JMeter?

JMeter is an open-source Java application used for testing purposes. 

What is Blazemter?

It is a brand new free chrome extension that enables you to record, update and run your test scripts. It keeps your data safe and secure by providing access to only authorized users. 

What is Distributed Load Test?

Distributed load testing uses multiple systems to perform testing. It is applied for testing the website and server application when multiple clients are working simultaneously.

What is a .jmx file?

A JMX file refers to a JMeter file in XML(Extensible Markup Language). It stands for Java Management Extension. 

What are some features of JMeter?

Some features of JMeter are good performance, recording and playback, scripting, report generation, integration with CI/CD (Continuous Integration and Continuous Deployment), customization, ThreadGroup, and analysis tools.

Conclusion

In this article, we saw what is distributed load test and recording login test. We also discussed what is JMeter, and how to install it. Further discussed the process of creating and running distributed load test and recording login test. We hope that now you have a clear understanding of the topic and are ready to perform testing yourself! 

Apart from distributed load test and recording login test, there are other API testing tools too. To name some,

Other than this, you may also refer to our Guided Path for coding interview preparations on Coding Ninjas Studio. Further, for thorough preparation, don’t forget to check out Data Structures and AlgorithmsCompetitive ProgrammingJavaScriptSystem Design, and many more! 

Do upvote our blogs if you find them informative and exciting!

Happy learning!

Live masterclass