Parameterize a Load Runner Script

How to Parameterize a Script in Load Runner?

Questions by Viveker2008

Showing Answers 1 - 6 of 6 Answers

Steps to Parameterize a script:
->select the text to be parameterized->R-click on that text you will have a option called Replace with parameter(click)->Here you will be creating a new parameter . In this you will have to the parameter name and when you click on properties, you will get one more pop up window in which you can create a table and add rows so that you give as parameters(values to be substituted when script is run) as you want.

Notice that when this process is finished your selected text will be replaced with the parameter name you gave and that will be in a pair of flower brackets & also in some different color.
Next time onwards in the same script, if you want to parameterize another text, when you right click you will be able to see the option 'Use Existing Parameter'. And you can include as many parameters as you want also you can paramterize with the same parameter.
And you will be knowing on experience, how to use the remaining options in the parameter properties like select next row..,update value on..

To view the parameter substitution while replaying go to RunTime Settings->Log->Enable->Extented Log->Parameter Substitution

priyankvyas

  • Jan 10th, 2009
 

Parameterization in LoadRunner is entirly based on scenario. According to scenario you need to select the "Type of Parameter". There are different types are there.
They are as follows - File,Table,Random Number,vuser id,gruop id etc.
One example is there to parameterize your test -

1) Select the value that you want to replace with parameterize value (eg. Seat No in Flight reservation application)

2) Right click on that field,one pop up window will come with options "Parameter Name","Type of Parameter"
3) Default name for any parameter is " NewParam" and type is "File".  Select Type of parameter as per need.
4) For current example i.e. to replace "Seat no" best suitable type would be "Random number"
5) Once you select the "random number", define "min" and "max" number default is 1 and 10  respectively.
6) For current scenario min =1 and max= 10 .
7) Than "Press OK"
8) In script value that is parameterize is visible as "{NewParam}"
9) Select the number of iterations from "Run Time Settings > Run logic" (eg. Action  = 4)
10) Now execute test and check the values in "Run Time Data" tab.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions