Performance Testing, LoadRunner Tips&Tricks

This site is moving to a bigger space @ LoadRunner TnT

Scripts: Parameterization

Point to note that parameterization may result in data dependency which the tester should be aware of and handle it appropriately. Every load test should at least require parameterization. Parameterization includes passing different types of data into the application to emulate the real world users performing/entering different values.

What do clients want to achieve from parameterization?
  1. To test different data
  2. Just to load/emulate the data
Parameterization requires identifying with the clients which areas required data input. This will be useful when discussing in the Application Design. From there, they can prepare the data from the database which is a more efficient method.


Preparing the data

Usually after walking through the application, I will request the client to prepare the date via the database and export it out as an excel file. This will reduce the time in preparing lengthy excel or notepad files. From there, you can manipulate the data easily in either Excel or OpenOffice.org. After I’ve amended the files properly, I will save it as a .dat file and placed it in a shared folder for my scripts to access.

Once converted into .dat file, ensure that they have been delimited properly with the commas. Take note that Vugen allows different delimiters in the Parameter List.

The usual items to parameterize are username, password, dates, etc but not limited to the mentioned. However, there are also hidden values that are stored in web pages (e.g. in the form of AJAX) or HTML codes (e.g. hard-coded hidden input) which are captured by Vugen. As such, I will point it out to the clients and request them to prepare the data for me.

Having said that, it’s best to define what is correlation and parameterization or you may end up spending effort in the wrong track.


Placement of the Parameter file

When you created a parameter for each script, by default, it’s stored in the root of the script folder. That is, if you save the script as test_script.usr in C:\, the parameter file will be saved in C:\test_script. For every script that has a parameter, it will be saved in its individual script folder. This way is good for a single script but when multiple scripts using the same parameter file is involved in the load test, it will be advisable to centralize the parameter file.

What I do when I’ve prepared the data files is that I will place them in a central repository (folder) where all my scripts will access. This is tidier and provides a way of ensuring consistency of the parameter used for all scripts.


Why parameterize different data?

Why is there different effect on different data? A simple example is uploading of different sizes of files. If parameter A is uploading 2MB of file while parameter B is uploading 4MB of file, it will definitely generate a higher throughput on the latter parameter. This may be a concern of the client.

Another example is querying different items in a database. Parameter A may query and return a smaller result while parameter B returns a bigger result causing a higher throughput.


Not the Obvious Data Dependency

Point to note that parameterization may result in data dependency which the tester should be aware of and handle it appropriately.

Examples are username and password submission: A username login will require a valid password. This may seemed obvious for this situation. However, as pointed earlier about the hidden input, you will have to be cautious on it. As Vugen records whatever is been transmitted to the server, the hidden input are recorded as well. Therefore, you will need to check back with the application developers to find out more about the hidden values associated with each parameter value. If possible, request them to provide a list of the values in Excel file format for you to manipulate.


Which Settings are correct?

Parameterization settings vary depending on your applications. You may like to sequential it or randomize it. Ensure the settings are correct. Usually I defined them as unique.


Testing the data

There is various ways to test if the parameters are correct. You can perform the following:
  1. Replay the script in Vugen with one iteration
  2. Replay the script in Vugen with three iterations.
  3. Replay the script in Controller with one Vuser.
  4. Replay the script in Controller with three Vusers.
These will be sufficient to test out the validity of the parameters used. You can also defined at which point the parameter values are been used by defining the starting row to retrieve data.


Other tips & tricks

Some applications/business processes only allow one time use of the parameter. For example, deletion. As such, you should be aware that after each test, request the client or the application team to revert the changes for you so that there are data for you to delete.


Related Topics

Scripts: Duplicating Files on the Fly
Scripts: Step Download Timeout
Scripts: VIEWSTATE
Scripts: Auto or Manual Correlation?
Scripts: Remove Think Time
Scripts: Set Debug Mode in Script
Scripts: Replay Failure – Use Full Extended Log!
Scripts: Starting a new transaction during iterations
Scripts: Any compatibility issues after upgrading LoadRunner versions?


Labels: , ,


Bookmark this article now! AddThis Social Bookmark Button



technorati del.icio.us reddit digg

3 Responses to “Scripts: Parameterization”

  1. # Anonymous Anonymous

    Comment to Test data testing:
    Once you record the script and it is running, rerun it also with:
    -different user on the same machine
    -different user on different machine
    - with more than one iteration

    also let run 1 user in controler with zero pacing and think time(or VUgen with many iterations) and from another VUgen instance run the same script with extended log. By this you filter out quickly issues related to concurrent runs.
    This is usefull also in SAP testing since there are data dependencies, locking data, etc. You get this idea.  

  2. # Anonymous karthik

    Im planning for SOFTWARE TESTING course in STC,Chennai.
    Does it have value and market in current industry.??
    Does it have bright future??.please guide me.I fear to spend quite a lot of money(70,000-80,000) without guidance.  

  3. # Blogger smallawei
Post a Comment


Powered by Google

Enter your email address:

Delivered by FeedBurner


Add to Technorati Favorites


XML

Powered by Blogger

make money online blogger templates

Powered by FeedBurner

Blog Directory

Top Blogs

Software Blogs -  Blog Catalog Blog Directory





© 2007 Performance Testing, LoadRunner Tips&Tricks | Blogger Templates by GeckoandFly.
No part of the content or the blog may be reproduced without prior written permission.
Learn how to make money online | First Aid and Health Information at Medical Health