Thursday, May 2, 2013

What are LR parameters and how they differ from variables that we declare?

When recording a script, any selection we make is recorded as part of the script. If we are viewing a banking site and transferred $250 then the value $250 is hard-coded into the script. To parameterize the script, we replace hard-coded data, such as the value $250 with a placeholder. This placeholder, called a parameter, is then used to introduce a variety of input values into the application during testing. Parameterizing the script eliminates problems that can cause errors in your testing or produce misleading load test results.

There are four situations where we need to parameterize the values.
1.    Unique constraint
2.    Date constraint
3.    Data dependency
4.    Data caching
Click here to know more

I will explain all these constraints in my next post J. You have to believe me.

Now, the difference between LR parameters and variables that we declare (stack variable)
1.    Allocated Memory: For LR parameters we never have to give the memory size that we need to allocate for it, that is defined automatically by LR but for stack variables that we declare we have to give memory size.
2.    Types: The types of LR parameter are different from that of stack variables. For example iteration number and int are different types.
3.    Data Value source: The values of parameters are stored in a file (most of the cases) and best part is that we don't have to write additional code for file processing. LR does all that by itself.

Thank you so much Mr. Loadrunner for making my life so easyJ.

No comments:

Post a Comment