Showing posts with label TestPlan. Show all posts
Showing posts with label TestPlan. Show all posts

Transaction controller in jmeter

Transaction Controller in Jmeter which is useful in measures child samples time taken to complete the transactions.Performance Testing with JMeter for Web applications i.e Samples which is HTTP sample requests and which have resources as Images,Stylesheets,Css,recording etc.

Transaction controller in jmeter

What is Transaction Controller?

Transaction Controller is generates an extra samples same as HTTP Samples in order to measures the overall time taken or response time of Transaction controller of child test samples,don't worry we will learn in details with real-time examples.

Transaction Controller in Jmeter

Transaction Controller has two check boxes,those are

1.Generate Parent Samples
2.Include duration of timer and pre-post processors in generated sample - It is the time which includes all processing samples within the Transaction controller , not just the HTTP samples.

Generate Parent Samples

If you check Generate Parent Samples check box in Transaction Controller then in Summary Report it will display only Transaction Controller Label and remaining nested HTTP Samples will not display in Summary Report.Please see below screenshot.Overall Response time is taken will display in Transaction Controller with nested HTTP Samples.It is not good practice to perform or run your test plan to perform performance testing of a proper test scenario.

Transaction controller in jmeter

Test Scenario

Open Product Page - Search The product - Checkout the Product page - Perform Payment

The above scenario will look like as below

Transaction Controller
Open Product Page Samples 1
Search The product sample 2
CCheck out the product sample 3
Payment sample 4

Above four samples are nested elements for Transacstion Controller,if you run above scenario or test plan with Generate Parent Samples check box on it will display only Transaction Controller label name and will not display all four samples label name in summary report.

Transaction controller in jmeter
Summary Report


If you want to check all the samples label name in Summary Report don't check Generate Parent Samples check box in Transaction Controller.

Transaction Controller without Generate Parent Samples

Uncheck Generate Parent Samples in Transaction Controller screen.

Transaction controller in jmeter


Now run your Test plan it will display Nested HTTP Samples + Transaction Controller Sample in Summary Report(Which will display all nested samples details as below).

Transaction controller in jmeter
Summary Report-Transaction Controller

Transaction Controller Problems

1.In Case one sample is failed then entire Transaction Controller will fail
2.In case any one sample assertion is failed then entire Transaction Controller will fail.

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.