How to Insert Transactions

Insert a transaction while recording

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, VuGen inserts an lr_start_transaction statement into the Vuser script.

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, VuGen inserts an lr_end_transaction statement into the Vuser script.

Back to top

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.

VuGen inserts an lr_start_transaction statement 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.

VuGen inserts an lr_end_transaction statement into the Vuser script. Enter a transaction name into the new step.

Simultaneously mark the start and end of a transaction
  1. Select the steps that you want to include in the transaction.
  2. 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.

  3. Enter a name for the transaction and click OK.

VuGen inserts an lr_start_transaction statement before the first selected step, and an lr_end_transaction statement after the last selected step.

Back to top

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.

  • Transaction names must be unique and may contain letters or numbers. Do not use the following characters: . , : # / \ " < & ' (single quote)

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

Back to top

See also: