jMeter Web Test Plan - JMeter

What is jMeter Web Test Plan?

Let us build a easy test plan which tests a web page. We write a test plan in Apache JMeter in order that we can test the performance of the net page shown by using the URL −

Start JMeter

Open the JMeter window by way of clicking on /home/manisha/apache-jmeter-2.9/bin/ The JMeter window seem as below –

jMeter - Web Test Plan

Rename the Test Plan

Change the call of test plan node to sample test within the call text box. You want to change the focus to workbench node and back to the test Plan node to peer the name getting reflected.

jMeter - Web Test Plan

Add Thread Group

Now we upload our first detail in the window. We add one Thread group, that is a placeholder for all different elements like Samplers, Controllers, and Listeners. We want one so we will configure number of users to simulate.

In JMeter, all the node elements are brought through using the context menu.

  • Right-click the detail where you need to add a child detail node.
  • Select the right option to add.
  • Right-click on on the sample test (our test Plan) > add > Threads (users) > Thread group. hence, the Thread group gets introduced under the test Plan (sample test) node.

jMeter - Web Test Plan

  • Name the Thread group as users. For us, this detail method users visiting the wisdomjobs home page.

jMeter - Web Test Plan

Add Sampler

We want to feature one Sampler in our Thread institution (users). As finished earlier for adding Thread group, this time we will open the context menu of the Thread group (users) node by right-clicking and we will add HTTP Request Sampler by means of selecting add > Sampler > HTTP request option.

jMeter - Web Test Plan

It will upload one empty HTTP Request Sampler below the Thread group (users) node. allow us to configure this node detail –

jMeter - Web Test Plan

  • Name − we can change the call to reflect the action what we need to achieve. we can name it as Visit wisdomjobshome page
  • Server Name or IP − here, we need to type the web server call. In our case it is (http:// part is not written that is only the name of the server or its IP)
  • Protocol − we will keep this blank, this means that we need HTTP because the protocol.
  • Path − we will type path as / (slash). It manner we need the root page of the server.

Add Listener

We can now upload a listener. allow us to upload View results Tree Listener below the Thread group (user) node. it will ensure that the outcomes of the Sampler can be available to view on this Listener node detail.

To add a listener −

  • Open the context menu
  • Right-click the Thread group (users)
  • Choose add > Listener > View results Tree option

jMeter - Web Test Plan

Run the Test Plan

Now with all of the setup, let us execute the test plan. With the configuration of the Thread group (users), we preserve all of the default values. It way JMeter will execute the sampler simplest once. it is just like a single user, only once.

That is similar to a user visiting a web page through browser, with JMeter sampler. To execute the test plan, select Run from the menu and choose start option.

Apache JMeter asks us to save the take a look at plan in a disk file before really starting the test. this is important if you want to run the test plan multiple times. you may choose running it without saving too.

jMeter - Web Test Plan

View the Output

We have saved the setting of the thread group as single thread (one person only) and loop for 1 time (run only one time), hence we will get the end result of one single transaction within the View result Tree Listener.

jMeter - Web Test Plan

Details of the above result are −

  • Green colour against the name visit wisdomjobs home page indicates success.
  • JMeter has saved all of the headers and the responses sent by means of the net server and ready to reveal us the result in many ways.
  • The first tab is Sampler outcomes. It indicates JMeter data as well as information returned through the net server.
  • The second tab is Request, which indicates all of the information sent to the net server as a part of the request.

jMeter - Web Test Plan

The remaining tab is reaction records. in this tab, the listener indicates the information received from server in text layout.

jMeter - Web Test Plan

This is just a easy test plan which executes only one request. but JMeter's real strength is in sending the equal request, as though many users are sending it. to test the web servers with multiple users, we need to change the Thread group (users) settings.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

JMeter Topics