Thursday, November 14, 2013

How to create a correlation rule in Loadrunner


Suppose you are working in a web application and it has 10 business scenarios to be scripted as part of your performance testing. There is a correlation for session id which will be used in all the scenarios. 

In this case, we do not need to spend time to correlate the session id in each scenario. Instead, we can create the correlation rule and the rest will be taking care by VuGen while recording.

Lets see how are we going to create the correlation rule in VuGen. Consider that we are working in Mercury Web Tours application.

Pre-requisite:  You know the left and right boundary for the session ID.

Step 1: Open the recording option -> Correlation -> Check "Enable correlation during recording"

Step 2: Click on New Application and enter the name of the application. In our case, its "Mercury"



Step 3: Select Mercury in the left panel and Click on New Rule. Then enter the rule name "Session ID". In the right hand side, you need to update the left and right boundary value.
Also provide the correlation variable name. In our case, its "Param_SessionID".


Step 4: Click on Advance button. Check "Replace with parameter only for exact parameter". Then click on OK.


Step 5: Start recording the business flow. Once the recording is done, check the script. 
VuGen automatically done the correlation for Session ID and replaces all the occurrences.




It's over. Simple, Isn't it?

In Summary, You can create "N" number of rules under the application. So that VuGen will automatically correlated based on your rules placed under the application.




3 comments:

  1. Very good article to know how to setup correlation rules. Keep posting.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete

Linux Series - SED Utility/Package - 4. Deleting Lines

Let’s explore sed’s explicit delete command, which you specify by using the option 'd'. Again, we are using the sample file named &#...