logo

BLOG

Correlation in LoadRunner!

Correlation is the fundamental concept and the first challenge faced by the performance testers while scripting the business processes for load testing. Correlation is used to capture the dynamic values returned by the server. If you as a performance tester are not being able to capture these changing values on each request then it means that either your script is throwing errors while playing back or it is not effective at all as you would not observe changes in the database and the Application Under Test [AUT].

It is good practice to mark small functions as transactions to see how well this part of functionality performed under heavy load. A poorly correlated script can deceive the beginners by showing the transaction is passed while play back but it may not be correct.

The best way to check your script that is appropriately correlated is to run the script with parameterized values for 5 to 10 times through VuGen and check if the database and AUT exhibits the changes made by the script, e.g. the records are inserted in the database and lists are populated in the AUT.

Correlation of Gmail Script

For the interest of beginners I would tell you how you can correlate a login script for www.gmail.com. ; So first you need to record a script from VuGen. I have copied a part of the script where correlation is required.

You can see the two parameters dsh and GALX in your recorded script; these two values are changed every time when you would try to play back and if these two values are not correlated then the script would throw error. You can correlate these two values either by manual correlation or automatic correlation.

Automatic Correlation

Please follow the below mentioned steps to implement automatic correlation in VuGen,

  • Go to Run Time settings
  • Select the Log option
  • Select extended log option and check all its options (Parameter substitution, Data returned by the server and advanced trace)
  • Save new settings and Run the script
  • Click on the option “scan script for correlation” to find out which parameters need to be correlated
  • Select parameters one by one and correlate them by clicking on “Correlate” button

Manual Correlation

Manual correlation is always preferred over automatic correlation due to the accuracy of this method. Following is the process to manually correlate dynamic values in VuGen,

  • Open the script in tree view
  • Click on http view option where you will see the URL: www.gmail.com is highlighted if you have clicked on dsh and GALX parameter before navigating to tree view.
  • Search these two parameters in the server’s response and correlate them.

Parameterization

Once the dynamic values are correlated; you need to parameterize your test for user name and password for Gmail login. To ensure your scripts are working you can enable the run time viewer while play back as it would confirm your login with parameterized users.

Happy learning !

Subscribe to our newsletter and Get Our Latest Posts Instantly!

Leave a Reply

Your email address will not be published. Required fields are marked *

Talk to Us

Shares