Saturday, February 20, 2010

LoadRunner Actions, Transactions and Run Time Settings

Dear reader, today it time to move ahead and learn something more about LoadRunner. Today we will be learning about Actions, Transactions and Run Time Settings which plays the crucial role in Performance Testing with LoadRunner...so lets start :)


Actions

An Action is a function in LoadRunner which contains the scripts generated after a recording is done. In Vugen, for any new script, there will be 3 actions –
  • vuser_init
  • vuser_end
  • Action
Of these the vuser_init, vuser_end and action must be present in each script and they execute only once during the script execution. A script can have more than 1 action and the name of the action can be modified as needed. But the names of vuser_init and vuser_end should not be changed.

1. vuser_init
   Execute only once at the beginning

2. Run - Action
   Execute number of times (iterations) specified.
   
3. vuser_end
   Execute only once at the end.

Please note that vuser_init and vuser_end can be executed only once. Whereas Actions can be executed any number of times.

To give an example for this,

A single user will login once (vuser_init) and can perform multiple transactions like Open Mail, Read Mail, Write Mail (Actions) and will logout once ( vuser_end).

Transactions

As I have given an example about the Transactions i.e. Login, Read Mail, etc and Logout, it is important to know about the timing information about these transactions. This is the point where LoadRunner helps.

LoadRunner Provides us with following function which helps us to find the exact timings information about the transactions. How much time spend by the transaction to process.

1. lr_start_transaction
2. lr_end_transaction

Everything that happens in between these functions will be counted in the Response time.

Note: The user think time should not be placed in between these two function otherwise it will be counted in the End-to-End Response Time.

Run Time Settings

Run Time Settings will helps us to emulate the behavior of user like in the production environment. Following are the Run Time Settings with the help of which we can achieve this.

1. Run Logic

  • Decides on the number of iterations and the various actions to be included
2. Pacing
  • Controls the Time Delay between iterations
3. Log
  • Decides on the type of messages that needs to be sent to the output log
4. Think Time
  • Decides on the pause time between step executions to simulate real time user activity
5. Miscellaneous
  • Provides options on Error Handling, Multithreading and Automatic Transactions.
6. Network
  • Decides on the Speed simulation
7. Browser Emulation
  • To Emulate Browser activities and Cache
8. Proxy
  • Proxy Settings for the Run

0 comments:

Post a Comment