LoadRunner Professional can detect dynamic values in the script and suggest their replacement with parameters. For automatic correlation, LoadRunner Professional uses rule-based, recording-based, and replay-based correlations.
LoadRunner Professional comes with a set of predefined, extendable rules for how to correlate dynamic values in well-known environments.
Example: An example of a rule in pseudo-code might be:
Find text that appears In the response body between string __VIEWSTATE” value=” and the nearest ” character and save it in parameter “AspNet_ViewState” to correlate the recorded value.
During code generation, LoadRunner Professional scans server responses for values that match the Correlation Rules. When a matching value is found, LoadRunner Professional adds a step to extract the value and save it in a parameter.
Then, the script code is scanned for the value and matches are replaced with a reference to the parameter.
For information about tuning the rules-based correlation, see Automatic correlation configuration.
After code generation, the script is scanned for additional correlation candidates in the client request steps. If a candidate was received from the server before it is sent by the client, it is suggested as a correlation. The suggestion includes the exact description of where and how to extract the dynamic value from the server response and where to replace data with a parameter.
You can accept suggestions in the Design Studio.
Replay the script at least once. It is not a problem at this stage if some steps fail.
The Replay-based scan compares the server responses before the failures for mismatched values. If such mismatched values are used in the script, they are suggested as correlations.
Repeat this process until the last failure is detected and correlated.
This section describes the basic workflow for working with automatic correlation.
Configure the Recording Options > Correlations node indicating which correlation types to scan.
Record a business process in VuGen. At the end of script generation, the Design Studio runs an automatic scan on the script and searches for dynamic values that need to be correlated. It displays the results in a table.
Locate the occurrence in the script. Select the value to correlate and click Correlate.
In the Details pane, check the added code. VuGen adds a web_reg_save_param function to the script to create the correlated parameter. The original value is replaced with the correlated value wherever it appears in the script.
Click Replay&Scan to scan for more dynamic values to correlate. Optionally, click Add as Rule to ensure that other similar dynamic values are recognized for correlation.
Repeat the above step, Replay&Scan, until no dynamic values are found.
If replay still fails due to a problematic argument value, continue with manual correlation. For details, see Manually correlate scripts.