Thursday, February 28, 2008

Scripting Overview

The starting point is a QTP script developed in conjunction with Siebel Test Automation. The user then manually inserts lines of code (calls to subroutines supplied as part of this Technical Note) to represent transaction boundaries and action definitions. Transactions and Actions (often referred to in this Technical Note) are part of LoadRunner terminology. Transactions represent units of actions for which performance characteristics are measured, monitored, and analyzed. An Action is comprised of one or more transactions and represents a unit of iteration during a load test. There are two special action types, vuser_init and vuser_end, each of which gets executed only once during a load test per virtual user. All other actions get executed as many times as the number of iterations specified for the load test.
The subroutine calls manually inserted into the QTP script result in ping commands being sent to the server that represent:
• The start of an action with the action name
• Beginning of a transaction with the transaction name
• End of a transaction with the transaction name
In each case, the web server responds with an OK message which is simply ignored. However, the ping commands have to be sent from a browser different from the one running the Siebel application.
The ping commands appear in the HTTP traffic which gets captured by LoadRunner. The AutoGenerate utility (supplied with this Technical Note) then performs post-processing on the LoadRunner script to identify and replace the ping commands with lr_start_transaction and lr_end_transaction calls that identify a transaction. The AutoGenerate utility also splits up the LoadRunner script into different .c files based on the action definitions in the QTP script.