Transactions in Loadrunner

Transactions in Loadrunner

Transactions in Loadrunner is classified into two types start and End transactions which is useful in identifying the response time taken for particular iterations or particular Actions for VUGen scripts. In my previous post you have learn web services scripting and Rest API scripting with examples,please read once for more information.

As i mention in LoadRunner transactions are divided into two transaction types ,those are

1.Start Transactions
2.End Transactions and one more is there
3.Sub Transactions but which will comes under Start Transaction only.

ALSO READ  How to Design a Goal Oriented Scenario


REST API scripting using Loadrunner
WebServices Scripting using Loadrunner
lr_xml_find Examples
Effort Estimation Preparation
lr_xml_extract examples

What is Transaction?

Transaction is nothing but verifying the response time taken to receive response from a server for a VUser requests, whether it is a single requests, Multiple requests etc.

For Example:

  • Execution of multiple SQL queries
  • User my account page is loading or displaying
  • Reports Generation as per search with the help of queries. Etc.
ALSO READ  Effort Estimation template for performance testing

How to Insert Transactions – Loadrunner

In Virtual User generator scripts you can insert transaction as below.

lr_start_transaction(“Transaction name”);
lr_end_transaction(“Transaction Name”,LR_AUTO);

Sub Transactions – Loadrunner

Sub transactions useful in verify the response time of sub http request responses.

Main Transaction : User purchasing Product
Sub Transaction : Debit Card/Credit Card payment.

ALSO READ  Loadrunner Actions

Once Payment is success then only User Purchasing Product transaction will complete other-wise it get Fail, so it depends on Payment method.

Sub Transaction – Syntax

Lr_start_sub_transaction(“sub transaction name”,”parent transaction name”);
Lr_end_sub_transaction(“sub transaction name”,LR_AUTO);

Final code looks like below model

Lr_start_transaction("purchasing product");


Lr_start_sub_transaction("Payment_Method"," purchasing product");



Lr_end_transaction("purchasing product",LR_AUTO);

Virtual User Script:

web_url("", "URL=", 
web_reg_find("Text=Manual Testing",LAST);
return 0;

Thank you for reading,pleases share this post with different social media so that many people will get knowledge.


Rajesh has over 8+ years of experience in Quality Assurance (Automation/ Manual). I've completed his B.Texh. He is an experienced software tester,work experience include working on tools like TestNG, Sikuli, Autoit, Selenium Builder and Appium, has worked on various projects from verticals like Retail, Insurance, Tolling and many more and passionate about designing Automation Frameworks that are effective and easy to maintain using Selenium Java.

One thought on “Transactions in Loadrunner

  1. Hello,

    The Article on Transactions in Loadrunner gives detailed information about it. Thanks for Sharing the information about the features of LoadRunner For More information check the detail on the Loadrunner testing

Comments are closed.