Parameterization


Parameterization
When you record a business process with VUGen, it records the actual values that you enter during the recording session. When you replay the script using multiple VUsers for multiple iterations, you do not want to repeatedly use the same value. Instead, you replace the constant value with a parameter. This process is called as Parameterization.

Another definition is - Parameter is a place holder which replaces a fixed value in the script statement and the process is called parameterization.



Why to do parameterization







Parameterization provides the ability to test your script with different values.









When to Parameterize?




Please remember that whenever you want to provide different input to the server through your script you must parameterize the hard coded value in your script.



















What happens if we don’t parameterize?






As shown in the above diagram, if you do not parameterize values, you might not get accurate response times.


















Creating a parameter

To parameterize a value in the script, you must select the value, right click it and select “Replace with a parameter”. In the Parameter List dialog box, please specify its name. There is no limit to the number of parameters you can define in your script.














Parameter data assignment methods

There are four types of data assignment methods in Parameterization
1)      Sequential
2)      Unique
3)      Random
4)      Same line as <Parameter>

Sequential
The Sequential method assigns parameter values to Vusers sequentially. As a running VUser accesses the data table, it takes the next available row.

Unique
The Unique method assigns a unique sequential value for the parameter.

Random
The Random method assigns a random value from the data table.

Same line as <Parameter>
The Same line as <parameter> method assigns data from the same line as a previously defined parameter. You must specify the column containing the data. A list of all the defined parameters appears in the pull-down menu.



Parameter data update  methods
There are three types of data update methods in Parameterization
1)      Each iteration
2)      Each occurrence
3)      Once

Each iteration
The Each iteration method instructs the VUser to use a new value for each script iteration. If a parameter appears in a script several times, the VUser uses the same value for all occurrences of the parameter, for the entire iteration. This is useful when the statements using a parameter are related.

Each occurrence
Each occurrence method instructs the VUser to use a new value for each occurrence of the parameter. This is useful when the statements using a parameter are unrelated. For example, for random data it may be useful to use a new value for each occurrence of the parameter.

Once
The Once method instructs the VUser to update the parameter value only once during the scenario run. The VUser uses the same parameter value for all occurrences and all iterations of the parameter. This type may be useful when working with dates and times.


Rendezvous point
Rendezvous point is used to create simultaneous users.

You might use Rendezvous point if you want to see the performance of the system when 1000 users try to deposit in their accounts one time. You can instruct 1000 vuser to login and do some deposit transaction to their respective accounts by inserting rendezvous point i.e. lr_rendezvous(“Name of rendezvous”), let’s say lr_rendezvous(“Deposit ”)function right before deposit transaction. Loadrunner pauses the vusers who ever reach that point, once all the required number of users reach that point, they perform the action simultaneously.

In Script, you can only mention the rendezvous name and its position. In Controller you can specify how many users you want to perform that particular action simultaneously.


Concurrent Vs Simultaneous users
All the vusers in a particular scenario are called Concurrent vusers. They may or may not perform the same tasks. On the other hand simultaneous vuser is more to do with rendezvous points. When we set rendezvous points we instruct the system to wait till a certain no of vusers arrive so that they all can do a particular task simultaneously. These vusers performing the same task at the same time are called Simultaneous vusers.
For example in a Yahoo Mail application: Suppose a scenario consists of 100 vusers with 3 tasks – 1) Login, 2) Check no of unread mails 3) Logout. Vusers at 1) + 2) + 3) will be called as concurrent vusers as they are part of same scenario performing some task but if have set a rendezvous point so that say 25 vuser perform the 2) task at the same time these 25 vusers would be termed as simultaneous vusers.


Script Regeneration
If you are enhancing your script and there is a lot of mess you have made in the script, you can regenerate your script and get the original raw script and start enhancing again.

If you have recorded your script in HTML mode and now you want it to be in URL mode, then you can change the mode in recording options and regenerate your script. Your script in URL mode will be ready for you.

You can go to Toolsà Regenerate script from the menu. Please have a look at the screenshot below


Note that when you regenerate your script, it will overwrite any changes you have made to the code. But comments and transactions that were inserted during recording will still be there in the regenerated script.


Comments

Popular posts from this blog

Loadrunner Functions

Neo Load Performance testing Tool

Analyzer in LoadRunner Part1