Measuring Server Performance - WinRunner

Transactions measure how your server performs under the load of many users. A transaction may be a simple task, such as entering text into a text field, or it may be an entire test that includes multiple tasks. LoadRunner measures the performance of a transaction under different loads. You can measure the time it takes a single user or a hundred users to perform the same transaction.

The first stage of creating a transaction is to declare its name at the start of the Vuser script. When you assign the Vuser script to a Vuser, the Controller scans the Vuser script for transaction declaration statements. If the script contains a transaction declaration, LoadRunner reads the name of the transaction and displays it in the Transactions window.

To declare a transaction, you use the declare_transaction function. The syntax of this functions is:

declare_transaction ( transaction_name );

The transaction_name must be a string constant, not a variable or an expression. This string can contain up to 128 characters. No spaces are permitted.

Next, mark the point where LoadRunner will start to measure the transaction. Insert a start_transaction statement into the Vuser script immediately before the action you want to measure. The syntax of this
function is:

start_transaction ( transaction_name );

The transaction_name is the name you defined in the declare_transaction statement.

Insert an end_transaction statement into the Vuser script to indicate the end of the transaction. If the entire test is a single transaction, then insert this statement in the last line of the script. The syntax of this function is:

end_transaction ( transaction_name [, status ] );

The transaction_name is the name you defined in the declare_transaction statement. The status tells LoadRunner to end the transaction only if the transaction passed (PASS) or failed (FAIL).


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics