Correlation

Correlation is the process of extracting dynamic values from server responses and using them in subsequent requests.
It helps in parameterizing dynamic data such as Session IDs, Tokens, Timestamps, Order IDs, ViewState, etc., to simulate real user behavior.

1

Identify

Identify the dynamic value in the server response.

2

Create Rule

Create a correlation rule using appropriate method (Reg Exp / HTML / JSON / XPath / etc.).

3

Extract & Save

Extract the value and save it to a parameter.

4

Use Parameter

Use the saved parameter in subsequent requests where required.

5

Validate

Run the script and validate that the value is captured and used successfully.

Choose Tool

LoadRunner (VuGen) – Correlation Guide

LoadRunner provides built-in parameter types to store dynamic values. Choose the right parameter type based on the use case.

LoadRunner – Parameter Types

Parameter Type Description When to Use How to Save
LB LoadRunner built-in parameter. Most common use. Save Parameter → LB
WB Web parameter (available across web requests). Use in multiple web requests. Save Parameter → WB
RB Replay Block parameter. Use within the same Replay Block. Save Parameter → RB
ORD Ordinary parameter (user defined). User defined custom parameter. Save Parameter → ORD
DSE Data Source parameter. When value comes from a data source. Save Parameter → DSE

Best Practices

  • Correlate only dynamic values (IDs, tokens, timestamps, etc.).
  • Use appropriate parameter type based on use case.
  • Validate correlation rule using "Test" option.
  • Use meaningful parameter names (e.g., p_sessionId, p_orderId).
  • Re-validate after application changes.

Common Issues

  • Incorrect pattern → No value captured.
  • Correlating static data → Script fails in real load.
  • Multiple values matched → Wrong value extracted.
  • Not using the saved parameter in subsequent requests.
  • Application change → Correlation breaks.