Apache Jmeter Web Test Plan

Apache Jmeter providing option to prepare web test plan to perform performance testing of your website in QA or production environment.Let us build simple web test plan ,here I am using my blog where pages are end with HTML extension.It is very easy to build web test plan in JMeter.

Apache Jmeter Web Test Plan

Please follow below easy steps to create JMeter Web Test Plan to perform load testing for different HTTP Requests of your applications.

Step 1 : Open Jmeter


Open Jmeter from F:\Java_Applications\apache-jmeter-3.0\bin folder by double click on jmeter.bat file in windows operating system,the JMeter windows open as below.

Apache Jmeter Web Test Plan


Step 2 : Test Plan 


Change the Test plan name as Software Testing ,i choosen this name because i am preparing Test plan for Software Testing blog,so you can mention any simple name for your Test Plan as mention below.

Test Plan Options


No need of Changing below Option.

1.Run Thread Groups Consecutively(i.erun groups one at a time).
2.Run teardown Thread Groups after shutdown of main threads.
3.Functional Test Mode.

Step 3 : Add Thread Group


Add Thread Group by Right Click on Test Plan - Add - Threads(Users) - Thread Group,Thread Group is the main component to access Samples , Controllers , Assertions and Listeners components
in our Test plan to verify the performance of Samples.

Apache Jmeter Web Test Plan
Threaad Group

Thread Group has below options

Thread Properties:


1.Number of Threads(Users)
2.Ramp-Up Period(in Seconds)
3.Loop Count []Forever.

Rename the Thread Group as VUsers,Just follow same as below window configurations.

Step 4 : HTTP Sampler


Now it's time to add HTTP Samplers in our Test Plan under Thread Group to add web application ,just right click on Thread Group - Add - Sampler - HTTP Request.It will add HTTP Request
under Thread Group and below window appears as below.
Apache Jmeter Web Test Plan
HTTP Request


HTTP Request has below configurations

Name - Change the name of the Request as Selenium Tutorials because we are adding Selenium Tutorials html page from blog.
Server Name or IP - ServerName indicates on which server it is deployed here server name is my blog softwaretestutorials.blogspot.in,in case in your company any ip address is providing then please add ip address here
Port - here not required,in case any port number is required in your company applications please enter port number.
Protocol - Here protocol is not required presently,will keep this as blank AS IS.
Path - Here path will mention with  ' / ' to seperate the html pages as Example : /p/selenium-tutorials.html then while running it will run as softwaretestutorials.blogspot.in/p/selenium-tutorials.html

Step 5 : Listeners


Listeners able to check your test plan HTTP request response whether request is giving proper response as a realtime environment.Here i am adding View Result Tree to view HTTP Request response ,in this listener you can view the response as Text,HTML,JSON etc formats.

Add Listeners:


  • Right click on Thread Group.
  • Click on Add - Listners.
  • Select View Result Tree in list items.Please see below View Result Tree window.
Apache Jmeter Web Test Plan
Jmeter Listners


Step 6 : Execute Test Plan


We have added all required Samplers,configured required sampler details as Server Name,Path etc and added Listeners to view the HTTP Sampler results.We can use Assertions to verify whether response is valid or not inorder to check PASS or FAIL.

Apache Jmeter Web Test Plan
Failed Requests


  • Now run the Test Plan by clicking on Green color icon or
  • Select Run menu and Click on Start option(Ctrl + R)
  • I have added two HTTP requests.

Please save your Test plan because it will ask you to save test plan and Save the Test plan as SoftwareTesting.jmx format and in Jmeter all test plans saves in JMX formats and you will observe your test plan will start running with one thread user ,1 second ramp up period and loop count is 1 ,here you can change number of thread users.Once the test plan running completed all your HTTP requests results will display in ViewResults Tree listeners.

View Results Tree


Your all samples results will display in Listeners as below and below points observed

Green Color - indicates particular HTTP Sampler request is Passed.
Red Color - Indicates particular HTTP Sampler request is Failed,it could be different reasons.

Apache Jmeter Web Test Plan



Here i have used only simple Test plan and you can run test plan with many number of Thread Users such as 10,20 or 25 etc users,Different Ramp-Up period by this you can check proper average response time for different HTTP requests.You can check Summary Report Listener to check Min,Max,Average in milliseconds,Throughput,Error percentage etc details as below.

Summary Report


Apache Jmeter Web Test Plan
Summary Report

No comments:

Post a Comment