Share this page

# Insert transactions in scripts

A transaction measures the time between two points in a business process. This topic describes how to use transactions in your TruClient 2.0 - Web scripts.

In this topic:

## About using transactions

Transactions can help you analyze the time it takes the Vuser to perform different sections of the process. For example, a transaction might start when sending credit card information, and end when receiving authorization.

Transactions in your script can overlap, or you can create transactions within other transactions.

Most transactions relate to a series of consecutive steps. However, transactions do not need to be sequential. You can use the same transaction name in different sections of the script, to join the time measurements of actions that do not directly follow one after the other. To use the same transaction name in different places, use the TC.startTransaction(name) and TC.endTransaction(name, status) functions. For details, see Web Vuser functions in the Function Reference.

Back to top

## Add transactions

You can use the context menu or the Transactions editor to add transactions to your script. You can also use the Transactions editor to edit and delete transactions.

Note: If you add a Transaction step before/after a level 2 or 3 step, and then change the level display so that step is hidden, the Transaction step remains in your script. You must reassign the Transaction step in the Transactions editor.

For details on the levels, see Step levels.

To add a transaction using the context menu:

1. Select one or more steps in your script. For multiple steps, make sure the start and end steps for the transaction are selected.

2. Right-click to open the context menu and select Surround with transaction.

3. Enter a unique transaction name.

4. Click OK. The Start transaction and End transaction steps are added above and below the selected steps.

To add and edit transactions using the Transactions editor:

1. Click the Transactions editor button in the Development window Toolbar, or in a Transaction step, to open the editor.

2. Define a unique transaction name.

3. Select the required Start step and End step for the transaction from the dropdown lists.

   Note: Make sure the Start step is earlier than the End step.

4. Click Save. The Transaction steps are added to the script.

Back to top

See also:

- Step properties

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 25.1-25.3 All View Local Help Center View Online Help Center Version: