Automatic Correlation

Automatic Correlation for LoadRunner

The automated correlation denotes that, following script generation and replay, after applying some predefined or manually applied conditions before recording, the LoadRunner (VuGen) discovers the dynamic value. You can use the automatic correlation to:

  • Before Recording (Rules)
  • After Recording (Record)
  • After Replay (Replay)

R3 (Rule, Record, Replay) can be used as a general guideline for automatic correlation techniques.

Let’s go over how to use an automatic correlation in the Vuser script in more detail.

a. Initial Recording:

This approach allows you to configure some correlation rules in VuGen before beginning the recording. However, it is only possible to set up correlation rules when you are aware of the dynamic variables that must be correlated prior to recording. It can be challenging to estimate the dynamic value before writing the script because the majority of apps are brand-new, and performance testers frequently lack knowledge of the underlying workings of the program. As a result, this approach is rarely adopted. You can construct correlation rules that will automatically detect the dynamic values when you record the program if you are highly familiar with the application and are aware of all the dynamic variables.

The ‘Automatically apply correlation rules’ option, which is available at:, must be enabled in order to use the LoadRunner autocorrelation functionality.

Recording Options -> Correlations -> Configuration -> Apply a rule scan to search for correlations -> Auto-correlate values when one is detected.

Choose this to enable automatic correlation of the determined dynamic values according to the specified rules. Refer to Figure 01 below:

LoadRunner Automatic Correlation

            Figure(1)

Additionally, VuGen includes a few correlation rules that are predefined for the application servers it supports. Using the following option, you can enable, disable, add, and delete the rules:

Correlations -> Rules -> Recording Options

LoadRunner Automatic Correlation Rule

                       Figure(2)

How does LoadRunner create a new rule for automated correlation?

1.Go to Record -> Recording Options -> Correlations -> Rules

LoadRunner Automatic Correlation Adding New Rule

                Figure(3)

2. Either add the application by clicking the ‘New Application’ button OR choose the application type from the provided list.

LoadRunner Automatic Correlation Adding New Application

                    Figure(4) Add New Application

https://www.perfmatrix.com/wp-content/uploads/2019/12/LoadRunner-Correlation-Automatic-Rule-New-Application-added.png

                         Figure(5)

3. Include ‘New Rule’ for the recently added application.

https://www.perfmatrix.com/wp-content/uploads/2019/12/LoadRunner-Correlation-Automatic-Rule-New-Rule.png

                               Figure(6)

https://www.perfmatrix.com/wp-content/uploads/2019/12/LoadRunner-Correlation-Automatic-Rule-New-Rule-Added.png

                  Figure(7)

4. Choose the proper “Action” from the provided list.

LoadRunner Automatic Correlation - Action

                          Figure(8)

5. From the list of options, choose the right “Scan Type.” Choose “Regular Expression” if you are confident with regular expressions; otherwise,

“Boundary Based” is the simplest option because all you need to do is specify the left and right bounds of the dynamic variable.

LoadRunner Automatic Correlation - Scan Type

                           Figure(9)

6. Submit the relevant input(s) in accordance with the ‘Scan Type’ option that was chosen.

https://www.perfmatrix.com/wp-content/uploads/2019/12/LoadRunner-Correlation-Automatic-Rule-Input.png

                 Figure(10)

7. The ‘Advanced’ option offers some other configuration options, such as Always generate new parameter, Replace with parameter only for exact matches, Reserve Search, Offset, Length, etc. The advanced properties are determined by the chosen Scan Type.

LoadRunner Automatic Correlation - Advanced

                           Figure(11)

8. After adding the rule, click the “Ok” button.

The following time you record the program, VuGen will identify dynamic variables based on the set rule and replace them with a correlation parameter.

b. After Recording: 

This method is useful when you want VuGen to determine the dynamic values based on some pre-established rules provided by LoadRunner but do not have a custom correlation rule. Once the script has been completely captured, VuGen can determine a sizable portion of dynamic variables using a set of established criteria. You must first enable the ‘Record Scan’ option before you can use this feature.

Scan for correlations applying -> Record -> Recording Options -> Correlations -> Configuration -> Scan Records

By default, the ‘Record Scan’ option is selected.

https://www.perfmatrix.com/wp-content/uploads/2019/12/LoadRunner-Correlation-Automatic-Record-Scan.png

For the discovered dynamic values, VuGen automatically generates correlation parameters and inserts the script. 60–90% of dynamic data can be automatically connected using this method. It would be best to avoid using this strategy if you are still learning about performance testing because you will acquire more knowledge the more you manually search for dynamic value in the script.

How can dynamic values be correlated after recording?

https://www.perfmatrix.com/wp-content/uploads/2019/12/LoadRunner-Correlation-Automatic-Record-Design-Studio.png
  1. After the recording is finished, you will receive the “Recording Report”, where the “Design Studio” option is available. The ‘Design Studio’ window can be opened by clicking on it. All dynamic values (as text) and connection parameter names (as suggested by VuGen) can be accessed in this window. The value you want to map is up to you.
https://www.perfmatrix.com/wp-content/uploads/2019/12/LoadRunner-Correlation-Automatic-Record-Correlate.png

2. Select the row and then click the “Map” button to map the value.

https://www.perfmatrix.com/wp-content/uploads/2019/12/LoadRunner-Correlation-Automatic-Record-Correlate.png

3. A new line can also be added which can be useful for future recordings. The ‘Add as Rule…’ button can be used to add the new rule.

https://www.perfmatrix.com/wp-content/uploads/2019/12/LoadRunner-Correlation-Automatic-Record-Add-as-Rule.png

4. After using the connection, click ‘Close’ and verify that the mapped section of the script is correct.

As said before, VuGen uses this method using default rules to identify dynamic values and provides connection ideas. It is up to you whether or not it correlates with the proposed value. When the proposed value is mapped, VuGen replaces all dynamic values associated with the match parameter and adds a match function in the appropriate location.

Again, if you’re still learning, choose manual connection over autocorrelation.

C. After the repetition:

Some dynamic values require playback so that Design Studio can effectively identify them and replace them with a playback parameter. It may be necessary to use ‘Play and Scan’ more than once before binding all dynamic values. This is only possible when VuGen completes at least one iteration completely (from start to finish). You must first select the ‘Play’ option by following the breadcrumb path to enable this method:

Find Matching Correlations -> Record -> Record Options -> Correlations -> Settings -> Playback

The ‘Play’ option is enabled by default.

https://www.perfmatrix.com/wp-content/uploads/2019/12/LoadRunner-Correlation-Automatic-Replay-Scan.png

1. After the recording is completed, you will receive the “Recording Report”, where the “Design Study” option is available. The ‘Design Studio’ window can be opened by clicking on it. In this window, you will find the option ‘Play and scan’. Press this button.

https://www.perfmatrix.com/wp-content/uploads/2019/12/LoadRunner-Correlation-Automatic-Replay-and-Scan.png

2. VuGen reruns the script in an attempt to discover more dynamic values.

Helpful Hint:

  • Open “Design Studio” once the recording is finished. Searches the script for mappings based on rules and logs. Choose the ‘Play and Scan’ option for repeat-based correlations if you think there may be additional dynamic values. Keep using this method until Design Studio discovers a new dynamic value.
  • The ‘Design Studio’ can be accessed directly from the VuGen menu by selecting Design -> Design Studio OR by pressing ‘Ctrl+U’.
  • You can enable all three options (Ruler, Record, and Play) even before the script recording begins.
  • Note that VuGen has an autocorrelation feature which, by recognizing some dynamic values based on set rules, provides a quick fix. However, VuGen still does not detect dynamic values. Consequently, you may also need a manual connection.
Scroll to Top