Applies to LoadComplete 4.97, last modified on May 20, 2019

In LoadComplete, you can define correlation rules that specify how it finds and correlates dynamic parameters in recorded traffic.

You can command LoadComplete to analyze recorded traffic and create correlation rules automatically, or you can create custom correlation rules manually. You do this in the Data Correlation Options dialog or in the Data Replacers panel of the Scenario editor. In the dialog, you can create a correlation rule anew, and in the panel, you create a rule from a parameter you correlated earlier. Let’s see how these approaches work.

In the Data Correlation Options dialog

  1. Open the Data Correlation Options dialog. To do this, select Tools > Options from LoadComplete main menu and then select Recording > Data Correlation in the resulting dialog.

  2. In the dialog, select a framework, for which you want to add a new rule, or create a new framework.

  3. Add a new rule to the selected framework or copy an existing rule to use it as a base for a new rule.

  4. In the Name text box, enter the rule name.

  5. Configure the created rule to correlate the needed dynamic parameter:

    1. Specify the Dynamic Parameter to Correlate
    • (Optional) Specify a search pattern for dynamic parameters.

      You can create a correlation rule that can be applied to multiple dynamic parameters. To do this, in the Find parameters | Expression text box, specify a search pattern (a regular expression) that the rule will use to find dynamic parameters in recorded traffic and to extract the parameter name. Later this name can be used to find parameter values in responses and requests.

      To specify a regular expression

    • In the Variable name text box, enter the name of the variable that will store the extracted data.

      If the Find parameters | Expression text box specifies a regular expression, you can use subexpressions to specify the variable name, in the $number format, where number is the subexpression position in the regular expression. For example, $1.

    2. Specify How the Rule Will Extract Data From Server Responses

    To extract data from an arbitrary part of a server response body or header (regular expression)

    To extract a parameter value from a Rich Internet Application response

    To extract data from a server response header parameter

    To extract a cookie that a server response sets

    If the data that the rule will extract contains URL-encoded characters or HTML entities, you can command the rule to encode the data. Select the needed encode rule from the Convert drop-down list.

    3. Specify How the Rule Will Insert the Extracted Data Into Requests

    To insert data into an arbitrary part of a request body or header (regular expression)

    To insert data into a web form or a Rich Internet Application request

    To insert data into a request header

    To insert a cookies into a request

    To specify the parameter to replace, you can also use subexpressions (groups) of the regular expression that the Select from responses | Expression parameter specifies, in the $number format, where number is the subexpression position in the regular expression.

    If the data that the rule will insert into requests contains URL-encoded characters or HTML entities, you can command the rule to decode the data. Select the needed rule from the Convert drop-down list.

  6. Save the created rule.

In the Data Replacers panel

You can easily create a correlation rule from a data replacer you created earlier for some request. LoadComplete will use this rule later when correlating response and request data automatically.

  1. Open your scenario for editing.

  2. In the editor, find a request with a dynamic parameter that was correlated earlier.

  3. Switch to the Data Replacers panel and check the Rule column value of the desired data replacer. It should be User.

    Right-click the replacer and select Create rule from the context menu:

    The 'Create Rule' menu item

    Click the image to enlarge it.

    LoadComplete will create a new correlation rule based on the parameter settings. You can see the new rule in the Tools > Options > Recording > Data Correlation dialog, under the Converted node.

    Created rule in the Data Correlation Options dialog

    Click the image to enlarge it.

See Also

About Data Correlation
Creating Data Correlation Rules Automatically
Correlating Dynamic Parameters Manually

Highlight search results