Multiple choice technology testing

In QTP, what command is used to insert the transactions in test?

  1. Services.StartTransaction "Name", Services.EndTransaction "Name";

  2. StartTransaction.Services “Name”,EndTransaction. Services "Name";

  3. StartTransaction ("Name"), EndTransaction ("Name");

  4. Services.StartTransaction "Name", EndTransaction. Services "Name";

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In QTP (QuickTest Professional), transaction operations are invoked through the Services object. The StartTransaction and EndTransaction methods are called on Services with the transaction name as a string argument. This syntax properly marks the beginning and end of a transaction for timing and reporting purposes.

AI explanation

In QTP (QuickTest Professional), transactions are inserted to measure the time taken for a set of steps using the Services object model: Services.StartTransaction "Name" marks the beginning, and Services.EndTransaction "Name" marks the end, with QTP reporting the elapsed time between them. The correct option preserves this exact object.method "argument" syntax for both calls. The distractors garble the syntax — reversing object and method order ('StartTransaction.Services'), dropping the Services object prefix entirely, or mixing correct and incorrect forms in the same statement — none of which are valid QTP scripting syntax.