Measuring Transactions

You can measure how long it takes to run a section of your test by defining transactions. A transaction represents the process in your application that you are interested in measuring. Your test must include transactions to be used by LoadRunner or the Business Process Monitor. LoadRunner and the Business Process Monitor use only the data that is included within a transaction, and ignore any data in a test outside of a transaction.


You define transactions within your test by enclosing the appropriate sections of the test with start and end transaction statements. For example, you can define a transaction that measures how long it takes to reserve a seat on a flight and for the confirmation to be displayed on the client’s terminal.

During the test run, the StartTransaction step signals the beginning of the time measurement. The time measurement continues until the EndTransaction step is reached. The test report displays the time it took to perform the transaction.

Note: If you start a transaction while there is already open transaction with the same name, the previous transaction is ended with Fail status and then the new transaction is started.

There is no limit to the number of transactions that can be added to a test. You can also insert a transaction within a transaction.

You can insert a variety of transaction-related statements using the Step Generator or Expert View. You can also enter Start Transaction and End Transaction steps using options in the QuickTest window.

Inserting Transactions:During the test run, the Start Transaction signals the beginning of the time measurement. You define the beginning of a transaction in the Start Transaction dialog box.

To insert a transaction:

1. Click the step where you want the transaction timing to begin. The page is displayed in the Active Screen tab.

2. Click the Start Transaction button or choose Insert > Start Transaction. The Start Transaction dialog box opens.

3. Enter a meaningful name in the Name box.

4. Decide where you want the transaction timing to begin. To insert a transaction before the current step, select Before current step and To insert a transaction after the current step, select After current step.

5. Click OK. A Start Transaction step is added to the Keyword View.

Ending Transactions: During the test run, the End Transaction signals the end of the time measurement. You define the end of a transaction in the End Transaction dialog box.

Note: There may be cases in which you want to instruct QuickTest to perform all the steps in a transaction, even though an error occurs during the run session. In the Run tab of the Test Settings dialog box (File > Settings), select proceed to next step from the When error occurs during run session list.

To end a transaction:

1. Click the step where you want the transaction timing to end. The page opens in the Active Screen.

2. Click the End Transaction button or choose Insert > End Transaction. The End Transaction dialog box opens.

3. The Name box contains a list of the transaction names you defined in the current test. Select the name of the transaction you want to end.

4. Decide where to insert the end of the transaction. To insert a transaction before the current step, select Before current step and to insert a transaction after the current step, select After current step.

5. Click OK. An End Transaction step is added to the Keyword View.

Also See: Other LoadRunner Tutorials

Rahnuma Tasnim

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top