Correlation

LoadRunnerΒ  CorrelationΒ  overview

The term “map” describes how dynamic values received from the server are processed. This dynamic data, such as session ID and authorization token, are the distinguishing values that are generated by the server for security purposes. Dynamic values can also relate to site content, such as dropdown options, dates, item and product IDs, order numbers, etc. You can capture these dynamic values through the map and pass them on to subsequent lookups. This is the fundamental idea behind LoadRunner’s “Correlation” concept.

Why is it necessary to map dynamic values?

You must first understand what exactly happens during script recording, script playback, and after correlation the dynamic variables to get the answer to this question.

Let’s see how the client and server behave when exchanging some dynamic values. The situation during the recording of a script is as follows:

https://www.perfmatrix.com/wp-content/uploads/2019/12/LoadRunner-Correlation-Overview-1.png

Figure 01: Playback Scenario

The script fails when you play it without making any changes because the dynamic value (session ID) provided by the server does not match the value returned by the client. As shown in Figure 02, the server generated a session ID of 222 while playing the script, but the Vuser script returned the registered value of 111 that was registered (Figure 01). As a result, the server refused to fulfill the request and returned an error.

https://www.perfmatrix.com/wp-content/uploads/2019/12/LoadRunner-Correlation-Overview-2.png

Figure 02: Offline Recurrence Scenario

The vuser script now captures and stores the most recent value generated by the server, returning it to the server on the next request when it maps the dynamic value (session-id) and runs the script again. The server returns the correct response after validating the received value against the created value. As a result, the user marks the request as successful.

https://www.perfmatrix.com/wp-content/uploads/2019/12/LoadRunner-Correlation-Overview-3.png

Image 03

I hope you now understand the importance of correlation in VuGen scripts.

The second thing to pay attention to is:

What are the typical values that require correlation?

  • Session ID
  • Access Token
  • Customer Name / ID
  • Order Number
  • Bill Number
  • Number of records displayed on a page
  • Current Date and Time

Depending on the type of application and the phrase used to describe them, there may be more values. Remember that your ultimate goal should be to identify and correlate all of the dynamic values that lead to the script failing.

There are two ways to map dynamic values in LoadRunner as follows:

  • Electronic correlation
  • Automatic correlation

We can see that there are several ways to determine the dynamic values in the script if we further divide the automatic and manual mapping.

1. Automatic correlation
  • Before recording (Rules)
  • after recording (Record)
  • After the repeat (Replay)
2. Manual correlation
  • When comparing two scripts for the same stream using WDiff
  • Using the playback log

This discussion of the notion of correlation also discussed the need for correlation in performance tests. The following blogs discuss automatic and manual mapping in detail.

Scroll to Top