How to run a test plan for a specified period of time

How to run a test plan for a specified period of time in Apache Jmeter,in my previous post you learned Proxy set up,record script in Jmeter for web applications,now in this post you will learn how to run a test plan for a specified period of time in Apache Jmeter.

Before you read this post,please read below posts


Please follow below steps to run your Test plan for a specific amount of time in Jmeter.

Step 1 : Add Thread Group to Test Plan,in Thread group mention specified Thread Users,Ramp-Up Period,Loop Count.

How to run a test plan for a specified period of time

Step 2 : Add HTTP Request Default to provide Server Name/Ip and Port number to perform on specific applications.
Step 3 : Add or Record HTTP Samples for AUT.

How to run a test plan for a specified period of time_1

Step 4 : Now add Summary Report/View Result Tree from  Listeners.
Step 5: Now go to Thread Group Select Scheduler check box ,it will enable Schedule Configuration fields to enter the details,which will have below fields.

Duration(Seconds)
Start Up Delay(Seconds)
Start Time 2016/10/10 22:39:23
End Time 2016/10/10 22:39:23

Start and End time is default no need of changing anything ,just you need to change Duration (Seconds) field as below.

How to run a test plan for a specified period of time_2


In case you want to run a test plan for 5 minutes then in Seconds 1 minute = 60 sec,so 5 minutes = 300 seconds.Simple enter 300 in Duration field,Save the script as .jmx extension.
Now run the Test Plan it will run up to 5 minutes and reports will generate as below.

Note : Select LoopCount as Forever check box.

Summary Report

Summary Report will show you the details as below

Summary Report at 1 minute 16 seconds

How to run a test plan for a specified period of time_3


Summary Report at 4 minutes 6 seconds.


How to run a test plan for a specified period of time_4


Summary Report at 5 Minutes means 300 Seconds as below.


How to run a test plan for a specified period of time_5


Here all threads are stopped ,please see below screenshot.


How to run a test plan for a specified period of time_6


Like this you can run your Test plan up to specified period of time in Jmeter.

Apache JMeter proxy setup step by step


Welcome to Apache JMeter Proxy set up step by step ,in this post I'm going to show you how exactly you need to set up proxy in Jmeter with step by step.Here I am using Firefox browser to set up proxy under network settings.

Why Proxy set up?

Proxy which is limited works in companies because in order to save from virus which is coming through different software.Coming to JMeter proxy set up which is requires while Recording the script for web application in different browser,please read Record Script in Jmeter in this post.

If you want to record the script in Apache Jmeter it is very important to set up Proxy settings under network settings of browsers then only JMeter recognize your actions on applications and record the same in Recording Controller where it will generate HTTP Request samples under Thread Groups.

Step By Step Proxy Set Up

1.Open Apache Jmeter from apache-jmeter-3.0\bin folder i.e for Windows double click on jmeter.bat file.
Apache JMeter proxy setup step by step
Open APACHE JMeter

2.Now add Thread Group to Test Plan.
3.Add HTTP Request Defaults.
4.Add Recording Controller.
5.Add HTTP Test Script Recorder under Workbench.
6.Under HTTP Test Script Recorder simply click on Start button ,it will ask you to install RooTCACertificate which will generates in bin folder of Jmeter.

Apache JMeter proxy setup step by step

7.Click on Ok button once you install CACertificate.
8.Now open Firefox browser.
9.Go to Tools - Options from Menu bar.

Apache JMeter proxy setup step by step
Open Firefox Browser

10.Click on Advance tab.

Apache JMeter proxy setup step by step

11.Click on Network tab and click on Settings button.
12.It will open Connection Settings window.
Apache JMeter proxy setup step by step
Connection Settings

13.In this window simply Click on Manual Proxy Configurations
14.Enter HTTP Proxy as Localhost and  Port number is 8181 as described in Record Script in Jmeter post,Please read this post to understand the main concept on Port number declaration.
15.Click on Use Proxy Server for all protocols check box.
16.Click on OK button,that's it you are done,now JMeter will record the script what ever actions you will perform on browser.

What have you learned?

How to open JMeter in windows.
Set up Proxy settings in Firefox Browser.
How to record the script in Jmeter.

How to record script in Apache Jmeter

Welcome to Apache JMeter tutorials ,in this post you will learn How to record script in Apache Jmeter for web applications for AUT.When i am working with Apache Jmeter it is very easy and some what touch regarding preparing the scripts.As per my real time experience I am giving details How to record script in Apache Jmeter for web applications.Please follow below easy steps to record script in Apache Jmeter.

Steps to Record script in JMeter


1.Install Apache Jmeter from Apache Software site.
2.Download from Binaries as Zip/tgz format.
3.Unzip the file.
4.It will download apache JMeter 3.0 with different folders,here I am using Apache JMeter3.0 version.
How to record script in Apache Jmeter
Apache Jmeter

5.Now in case you are using Windows platform please open Apache Jmeter as jmeter.bat file from F:\apache-jmeter-3.0\bin path as below.
How to record script in Apache Jmeter
Open APACHE JMeter

6.Before recording the script please read below important steps to record script correctly.


Below are the components we are going to use,those are

1.Thread Group.
2.HTTP Request Defaults.
3.Recording Controller.
4.HTTP(S) Test Script Recorder.
5.View Results Tree.

7.Please add Thread Group in Test Plan ,Right click on Test Plan-Add - Threads(Users) - Thread Group.
How to record script in Apache Jmeter
Add THRED GROUP

8.Now add HTTP Request Default from Right click on Thread Group - Add - Config Elements - HTTP Request Default.In HTTP Request Default please add below details.
How to record script in Apache Jmeter
ADD HTTP REQUEST DEFAULT


Server Name or IP  - Ex: softwaretestutorials.blogspot.in ,you can add your QA/Dev server ip
Port - for my site not required and in your testing environment server will have port number ex: 8080,That's it.

9.Now Add Recording Controller why because all recorded html/.net any pages will add under Recording Controller component from Right Click on Thread Group - Add - Logic Controller - Recording Controller.
How to record script in Apache Jmeter
Add Recording Controller

10.Under Workbench please add HTTP(S) Test Script Recorder which is useful in recording the scripts from Right click on WorkBench - Add - Non Test Elements - HTTP(S) Test Script Recorder.
In HTTP(S) Test Script Recorder you have to provide Port number which is not using ,suppose you are using 8080 in your applications then you can give other than 8080 ex:8088  ,this ip should be configured in Proxy set up in browser then only your script will record properly.
How to record script in Apache Jmeter
HTTP Test Script Recorder


In HTTP(S) Test Script Recorder below details should be add,those are

1.Port
2.URL Patterns to include - Pattern will be .*\.html in case you want to record particular html extension pages.
3.URL Patterns to Exclude - Patterns will be (?i).*\.(bmp|css|js|gif|ico|jpe?g|png|swf|woff) ,this is default.
HTTP Test Script Recorder patterns


10.Now click on Start button in HTTP(S) Test Script Recorder,it will now generate ROOTCACertificate in F:\apache-jmeter-3.0\bin folder just you need to install this one in your browser Ex:Firefox Browser.
11.Click on Ok button.
12.Set up Proxy configuration in Firefox Browser as mention above below 6th step,otherwise your jmeter script will not record.
13.Open Firefox browser enter softwaretestutorials.blogspot.in hit enter.
14.Click on Some pages
15.Now check the Recording Controller ,it will automatically display recorded html pages under Recording Controller.
16.You will see the HTTP request details as below under Recording Controller.
How to record script in Apache Jmeter


What have you learned?


1.How to set up proxy in Jmeter
2.What are the components required for Recording.
3.How to record the script in Jmeter.