How to use Transactions in QTP/UFT

In Micro Focus UFT/QTP, You can measure how long it takes to run a section of your test by defining Transactions. You define transactions within your test by enclosing the appropriate sections of the test with start and end transaction statements.

Transactions can be inserted anywhere in the script

There is no limit to the number of transactions that can be added to a test.

How to insert transactions in QTP?

You can also insert a transaction within a transaction

Following video takes you through the steps to insert a Transaction in HP UFT.

Click here if the video is not accessible

For example, you may want to note the time taken to book a flight.

  1. In QTP, select the appropriate state where you want to start your transaction.
  2. Select Insert Start Transaction. Start Transaction Dialog Box opens
  3. Give the transaction a suitable name, say “Booking Time”
  4. A start transaction statement is added in the test
  5. Select the state where you want to end the transaction
  6. Click Insert > End Transaction
  7. End Transaction Dialog Box Opens with the list of all available transactions
  8. Click Okay. An end transaction statement is added
  9. Let’s run the test
  10. In results, the end transaction statement gives the time taken to insert the order