Table of contents
1.
Introduction
2.
Building a Web Test Plan 
2.1.
Adding Users
2.2.
Adding Default HTTP Request Properties
2.3.
Adding Cookie Support
2.4.
Adding HTTP Requests
2.5.
Adding Listener
2.6.
Log in to the website
2.7.
Same user/different users
2.8.
Use Thread Group to control the Authorization Manager
3.
Frequently Asked Questions
3.1.
Is the JMeter utility free?
3.2.
Can the JMeter web test plan test a web application?
3.3.
What do the terms "JMeter's test plan" or "workbench" mean?
3.4.
What does JMeter load time mean?
3.5.
In JMeter, what is idle time?
4.
Conclusion
Last Updated: Mar 27, 2024

Introduction To JMeter Web Test Plan

Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Web testing is a software procedure that assures software quality by examining if a web application's functionality functions as expected or in accordance with the requirements.

JMeter is a Java-only desktop application for load and performance testing that performs web testing. A timer, thread group, listener, and controller are some of the components that make up JMeter. 

Introduction To JMeter Web Test Plan

This blog will teach you more about the JMeter thread group component.

Building a Web Test Plan 

An outline of the actions that a JMeter will perform is called a test plan. A JMeter web test plan consists of one or more components.

You will discover how to write a simple JMeter web test plan further in this blog on how to test websites.

The image given below is a picture of the sample test plan.

sample test plan

Adding Users

In each JMeter web test plan, the initial step should be to create a thread group element. The thread group gives JMeter instructions for the number of users to mimic, the number of requests each user should send, and the frequency at which they should send them. 

The image provided below shows how to create a thread group.

create a thread group

A thread group panel opens up.

thread group panel

Start by giving the thread group a clearer name in the name field than the default one; only after that will the user be defined.

defining the user

The ramp-up period box tells JMeter to use this attribute to determine how long to wait before starting for each user. JMeter is instructed on how often to repeat your test using the loop count field attribute.

Adding Default HTTP Request Properties

Specify the HTTP request defaults to determine the actions that they will take in a JMeter web test plan. The total HTTP requests are calculated as follows: (Number of Users) x (Number of Requests) x (number of times).

The image provided below shows how to create an HTTP request.

create an HTTP request

An HTTP request panel opens up. You may load test a web server by sending an HTTP request using the sampler JMeter HTTP Request.

HTTP request panel

Make changes only in the fields that are required, like the server name or IP.

changes in the fields

Adding Cookie Support

All web testing in a JMeter web test plan should use cookie support unless your application specifically doesn't use cookies. 

The image provided below shows how to create an HTTP cookie manager.

HTTP cookie manager

An HTTP cookie manager panel opens up. Similar to a web browser, the cookie manager saves and transmits cookies.

HTTP cookie manager panel

Adding HTTP Requests

We will send two HTTP requests as part of our JMeter web test plan. The home page is the name of the first HTTP request, and the changes page is the name of the second HTTP request. JMeter sends queries in the tree's order of appearance.

first HTTP request

Put "Home Page" in the name field and "/" in the Path field.

 "/" in the Path field

Add the second HTTP request and make the changes required.

second HTTP request

Adding Listener

This component gives a visual representation of the data and saves all of the responses in a file at our JMeter web test plan.

The image provided below shows how to create graph results.

creation of graph results

graph results panel opens up. Graph Results creates a graph between the response time and the total time. The graph lines display the average of response time, median response time, variance in response time, and the number of samples per minute for all queries.

graph results panel

Log in to the website

When logging in using a web browser, a form including the user name, password, and a submit button will be displayed. The button creates a POST request and includes arguments for the form elements.

For this, create an HTTP request and choose POST as the method in the JMeter web test plan. Set the submit button's target as the path('/').

POST request

The login and password information should be entered by clicking the Add button twice.

login and password

Same user/different users

When developing a JMeter web test plan, we can simulate the same user running many iterations or other users running a single iteration. "Same user on each iteration" will be checked by default.

Same user on each iteration

Use Thread Group to control the Authorization Manager

The image provided below shows how to create an authorization manager.

authorization manager

An HTTP authorization manager panel opens up. JMeter web test plan handles browser authentication pop-up using this component.

HTTP authorization manager panel

Check the field “Use Thread Group configuration to control clearing." With the help of this option, you may specify if the new iteration involves the same user or a new one. It is tied to the Thread group's "Same user on each iteration" field.

Check the field

We hope you have understood everything about the JMeter web test plan.

Frequently Asked Questions

Is the JMeter utility free?

JMeter is a piece of open-source software.

Can the JMeter web test plan test a web application?

JMeter is used to evaluate and gauge the performance of websites, software services, and application performance.

What do the terms "JMeter's test plan" or "workbench" mean?

The WorkBench offers a location to temporarily store test components. The Test Plan and WorkBench have no connection. JMeter won't save WorkBench material.

What does JMeter load time mean?

The period of time between submitting the request and receiving the final piece of the answer is known as the load time. Roundtrips are quantified by latency and load time in JMeter.

In JMeter, what is idle time?

Idle time is the time between your operations or samplers in a test plan.

Conclusion

In this blog, we have discussed an introduction to the JMeter web test plan in a stepwise manner.

If you think this blog has helped you enhance your knowledge about the above question, and if you want to learn more, check out our articles. Visit our website to read more such blogs. 

  1. What are JMeter ─ Functions?
  2. Introduction to JMS test Plan in JMeter
  3. Introduction to JMeter Listeners

 

But suppose you have just started your learning process and are looking for questions from tech giants like Amazon, Microsoft, Uber, etc. In that case, you must look at the problemsinterview experiences, and interview bundles for placement preparations. Enroll in our courses and refer to the mock test and problems available; look at the Problem Sheets interview experiences, and interview bundle for placement preparations. You can also book an interview session with us.  

Happy learning, Ninja!

Live masterclass