Thursday, July 21, 2016

Performance testing - Parameterization in Loadrunner

Parameterization

Replacing the recorded values in the script with parameters is knows as parameterization. It is used when application needs unique data (such as user name) and data dependency (such as passwords), Data Cache. When we record the script in vugen, user input is sent for one user only. When the script runs in controller, we have to pass different input.  if we send different data in each iteration the real performance transaction timers can be measured.

The main purpose of the parameterization is to simulate the real user actions, to ensure that results are not fetched from cache to stress the data base
Select the value that is to be replaced with parameterize, -> right click -> replace with parameter -> parameter name and parameter value.
Parameter Types
In Load Runner We have 11 parameter types

  1. File
  2. Date/Time
  3. Group Name
  4. Iteration Number
  5. Table
  6. Load Generator Name
  7. Random Number
  8. Unique Number
  9. User Defined Function
  10. Vuser ID
  11. XML


Data Assignment Methods
In loadrunner, we have three data assignment methods. They are

  • Sequential
  • Random and
  • Unique
  • Same line as

Sequential:

It will pick the data in step by step manner. In sequential we have three types
Sequential each iteration: The value will be updated for each iteration
Ex: values (AA, BB, BB), no of iterations (3)


No of Iterations User Name
Iteration-1 AA
Iteration-2 BB
Iteration-3 CC

Sequential each Occurrence:
The value will be updated on each occurrence.
Ex: values (Anil, Sandeep, Veera, Vishu, Malli), no of iterations (3) and occurrences-3


No of Iterations Occurrence User Name
Iteration-1
        1 AA
2 BB
3 CC
Iteration-2
        1 DD
2 EE
3 AA
Iteration-3
        1 BB
2 CC
3 DD

Sequential Once: whatever the value picked by the first user in first iteration will be chosen as default value for all the fields (users and iterations).
Each user has to depend on previous user.
Ex: values (Anil, Sandeep, Veera), no of iterations (3)


No of Iterations User Name
Iteration-1            AA
Iteration-2            AA
Iteration-3            AA

Random

It will pick the data randomly. Values will change for each simulation. In random, we have three types.
Random each iteration (All the values will be chosen randomly)
Random each occurrence (All the values will be chosen randomly)
Random once ( whatever the value picked by the vuser in first iteration, it will remain same for all the iterations)

Unique

It will pick the data in unique manner. In unique, we have three types.
Unique each iteration:
Abort vuser: When all the values are used, V-users are not simulated (or) aborted. A sign like ” - “will appear instead of values
Ex:  values (Anil, Sandeep, Veera, Vishu, Malli), no of iterations -3


No of Iterations Iteration1 Iteration2 Iteration3
User Name1 AA BB CC
User Name2 DD EE -
User Name3 - - -

Continue with cyclic manner: When all the values are used, V-users are simulated starting with the first value and so on.
Ex:  values (Ramesh, Thirumalaiah, kalyan, Vishu, Malli, vamsi, Anil, Sandeep, Veera), no of iterations -6


No of Iterations Iteration1 Iteration2 Iteration3 Iteration4 Iteration5 Iteration6
User Name1 AA BB CC DD EE FF
User Name2 GG HH II GG HH II
User Name3 - - - - - -


Continue with last value When all the values are used, V-users are simulated using the last value.
Ex:  values (Ramesh, Thirumalaiah, kalyan, Vishu, Malli, vamsi, Anil, Sandeep, Veera), no of iterations -6

No of Iterations Iteration1 Iteration2 Iteration3 Iteration4 Iteration5 Iteration6
User Name1 AA BB CC DD EE FF
User Name2 GG HH II II II II
User Name3 - - - - - -

Unique each occurrence: The value will be updated on each occurrence. When all the values are used, V-users are not simulated.
Ex: values (Anil, Sandeep, Veera, Vishu, Malli), no of iterations (3) and occurrences-3


No of Iterations Occurrence User Name
Iteration-1
        1 AA
2 BB
3 CC
Iteration-2
        1 DD
2 CC
3 -
Iteration-3
        1 -
2 -
3 -


Unique once whatever the value picked by the user in first iteration will be selected as same value for all the iterations for the same user. There is no user dependency

Ex: values (Anil, Sandeep, Veera), no of iterations (3)


No of Iterations User Name
Iteration-1 AA
Iteration-2 BB
Iteration-3 CC

No comments:

Post a Comment