Share this page

# Using transactions

You can insert transactions into your scripts to measure performance for a specific process or task.

In this topic:

## Transaction overview

You define transactions to measure the performance of the server. Each transaction measures the time it takes for the server to respond to specified Vuser requests. These requests can be simple tasks such as waiting for a response for a single query, or complex tasks, such as submitting several queries and generating a report.

To measure a transaction, you insert Vuser functions to mark the beginning and the end of a task. Within a script, you can mark an unlimited number of transactions, each transaction with a different name.

For OpenText Professional Performance Engineering, Controller measures the time that it takes to perform each transaction. After the test run, you analyze the server's performance per transaction using the Analysis' graphs and reports.

Before creating a script, you should determine which business processes you want to measure. You then mark each business process or sub-process as a transaction.

You can create transactions either during or after recording.

## Insert a transaction while recording

You use the VuGen Recording toolbar to insert a transaction while recording a Vuser script.

To | Do this
--- | ---
Mark the start of a transaction | On the Recording toolbar, click the Start Transaction button , enter a transaction name, and click OK. When the script is generated, it includes an lr_start_transaction statement.
Mark the end of a transaction | On the Recording toolbar, click the End Transaction button and select the transaction to close. When the script is generated, it includes an lr_end_transaction statement.

## Insert a transaction after recording

You use VuGen's Editor to insert a transaction after recording a Vuser script.

To | Do this
--- | ---
Mark the start of a transaction | Locate the cursor in the script where you want to start the transaction and do one of the following: Select Design > Insert in Script > Start Transaction. Press Ctrl+T. Right-click in the script where you want to start the transaction and select Insert > Start Transaction. An lr_start_transaction function is inserted into the Vuser script. Enter a transaction name into the new step.
Mark the end of a transaction | Locate the cursor in the script where you want to end the transaction and do one of the following: Select Design > Insert in Script > End Transaction. Press Ctrl+Shift+T. Right-click in the script where you want to end the transaction and select Insert > End Transaction. An lr_end_transaction function is inserted into the Vuser script. Enter a transaction name into the new step.
Simultaneously mark the start and end of a transaction | Select the steps that you want to include in the transaction. Do one of the following: Select Design > Insert in Script > Surround with Transaction. Press Shift+Ctrl+I. Right-click inside the selection and select Surround with Transaction. The Surround with Transaction dialog box opens. Enter a name for the transaction and click OK. An lr_start_transaction function is inserted before the first selected step, and an lr_end_transaction function after the last selected step.

## Transaction guidelines

- You can create nested transactions—transactions within transactions. If you nest transactions, close the inner transactions before closing the outer ones—otherwise the transactions cannot be analyzed properly. Nested transactions must be contained within a single action section.

- A failed transaction does not automatically set the script's Replay status to Failed.

- Transaction names:

  - Must be unique.
  - Have a maximum length of 256 characters.

  - Must contain only printable characters, which can be any combination of letters, numbers, and punctuation marks.

## See also

- Display transactions
- Cross-Vuser transactions

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 26.1-26.3 All View Local Help Center View Online Help Center Version: