Data Correlation Options

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

Settings in this dialog control the way LoadComplete discovers and correlates dynamic parameters in scenarios.

To invoke the dialog:

  • Select Tools | Options from LoadComplete main menu. LoadComplete will display the Options dialog.

  • Choose Recording | Data Correlation from the tree on the left of the dialog.

The dialog shows a list of data correlation rules specified in LoadComplete.

Rule Parameters

For each rule, you specify the following parameters:

General
Parameter Description
Name The rule name.
Find parameters
Parameter Description
Expression The regular expression that specifies the dynamic parameter or multiple parameters to be correlated.

Can include subexpressions (groups) that the rule’s other parameters will use.

Use it to create a rule that correlates multiple dynamic parameters in the same part of requests and responses.

You can enter the needed regular expression manually or you can click and create the regular expression visually via the Find Parameters Data Correlation Rule wizard.

Variable name The name of the variable that the rule uses to store the extracted data, or the template that the rule will use to generate variables to store extracted data.

Can include subexpression (or several subexpressions) that the Expression text box specifies, in the $number format, where number is the subexpression position in the regular expression.

Note: If the variable name is not specified, and the Select from responses | Area parameter is set to Body (Path) , Header (Path) or Cookie, the rule will create variables with the same names as the names of the parameters it will extract.
Select from responses
Parameter Description
Area The part of the response, from which the rule extracts data:
  • Body (RegExp) - Select this option to extract data from an arbitrary part of a response body.

  • Body (Path) - Select this option to extract a parameter from a response.

  • Header (RegExp) - Select this option to extract data from an arbitrary part of a response header.

  • Header (Path) - Select this option to extract a response header parameter.

  • Cookie - Select this option to extract a cookie that a server response sets.

Note: If the area is set to Body (Path), Header (Path), or Cookie, the rule will ignore the Find parameters | Expression regular expression.
Expression The data that the rule extracts from a response.

Depends on the selected area:

  • Body (RegExp) or Header (RegExp)

    The regular expression that the rule applies to the response body or header to find the data to be extracted.

    You can specify a complex regular expression that extracts a larger piece of data, and use subexpressions (groups) in this expression to save a smaller piece of data to a variable. For example:

    Id="(\d+)"

    In addition, you can include subexpressions that the Find parameters | Expression expression specifies, in the $number format. For example:

    name="$1".*?\s*?value="(.*?)"\s*

    You can enter the needed regular expression manually or you can click and create the regular expression visually via the Create Selector Data Correlation Rule wizard.

  • Body (Path)

    The name of the parameter whose value the rule extracts.

    For Rich Internet Applications, it specifies the full parameter name starting from the root element of the parameter tree in a RIA response. For example, Message[1]/[1]/headers/DSId.

    You can find the parameter name on the Response Body page of the recorded response.

    For Rich Internet Applications, find the parameter path in the Path column on the Response Body page.

  • Header (Path)

    The full name of the response header parameter that the rule extracts. For example, Response/Header/ReturnUrl.

    You can find the parameter name on the Response Header panel of the recorded response.

    To configure the rule to try to correlate all parameters of the header, specify the full header name (with a trailing slash). For example, Response/CustomHeader/.

  • Cookie

    The name of the cookie, whose value the rule extracts.

Attributes (For rules that have a regular expression in the Expression text box specified) A subexpression (group) of the specified regular expression that points to a smaller piece of data the rule extracts. Subexpressions (groups) are parts of regular expressions enclosed in parenthesis, for example:

[: \#\?&]gfe_rd=(.*?)[&\r\n]

The subexpression must be in the $number format, where number is the subexpression (position) in the specified regular expression. $1 matches the first subexpression (group), $2 matches the second subexpression (group), and so on. $0 matches the entire regular expression.

Convert Specifies whether the rule encodes the extracted data. See Converting Correlation Data.
Replace in requests
Parameter Description
Area The part of the request, into which the rule inserts the data:
  • Body (RegExp) - Select this option to insert data into an arbitrary part of the response body.

  • Body (Path) - Select this option to insert data into a web form or into a Rich Internet Application request.

  • Header (RegExp) - Select this option to insert data into an arbitrary part of the request header.

  • Header (Path) - Select this option to insert data into a request header.

  • Cookie - Select this option to insert a cookie into a request.

    Note: For cookie-replacement rules, we recommend using the Cookie area rather than Header (Path) or Header (RegExp).
Expression The pattern that the rule uses to search for the data to be replaced.

Depends on the selected area:

  • Body (RegExp) or Header (RegExp)

    The regular expression that the rule applies to the request body or header to find the data to replace (the rule treats the whole header as a text line and applies the regular expression to it).

    You can specify a complex regular expression that finds a larger piece of data and use subexpressions (groups) in this expression point to a smaller piece of data to be replaced. For example:

    Id="([A-F0-9])"

    You can enter the needed regular expression manually or you can click and create the regular expression visually via the Create Replacer Data Correlation Rule wizard.

  • Body (Path)

    The name of the web form’s or RIA request’s parameter, whose value the rule replaces with the extracted value.

    For Rich Internet Application, specify the full parameter name starting from the root element of the parameter tree in a RIA request. For example, Message[1]/[1]/clientId.

    You can find the parameter name on the Request Body page of the recorded request. For Rich Internet Applications, find the parameter path in the Path column on the Request Body page.

  • Header (Path)

    The name of the request’s header parameter, whose value the rule replaces with the extracted data. For example, Request/Query/SessionID.

    You can find the needed header parameter in the Request Header panel of the recorded request.

    To configure the rule to try to correlate all parameters of the header, specify the full header name (with a trailing slash). For example, Request/Query/.

  • Cookie

    The name of the cookie, whose value the rule will replace.

Can include subexpressions (groups) of the regular expression that the Select from responses | Expression text box specifies, in the $number format, where the number is the subexpression (position) in the specified regular expression. For example, Request/Query/$1.

Attributes Additional attributes that the rule applies to the data to be replaced. Depends on the selected area:
  • Body (RegExp) or Header (RegExp)

    A subexpression (or group) that points to the smaller piece of data to be replaced, in the $number format, where number is the subexpression position (from 1) in the specified regular expression.

  • Cookie

    An additional parameter (attribute) the rule adds to the cookie it inserts into the request. See Cookie Replacer Attributes.

Convert Specifies whether the rule will decode the data before inserting it into requests. See Converting Correlation Data.
How the Rules Work

When you command the Correlate Request and Response Parameters wizard in LoadComplete to use pre-defined rules to correlate parameters in a scenario, LoadComplete performs the following for each enabled rule:

  1. If the Find parameters | Expression regular expression is specified, LoadComplete analyzes the scenario responses and finds a dynamic parameter or multiple dynamic parameters that match the regular expression.

    If the regular expression is not specified, LoadComplete will use the Select from responses and Replace in requests parameters to find a needed dynamic parameter.

  2. LoadComplete creates a variable with the name that the Variable name parameter specifies.

    If the Variable name parameter uses subexpressions, LoadComplete extracts the needed part of the data that the Find parameters | Expression regular expression matches and inserts it to a variable name.

    If the variable name is not specified, and the Select from responses | Area parameter is set to Body (Path), Header (Path), or Cookie, LoadComplete will use the name of the parameter it will extract as the variable name.

  3. LoadComplete uses the Select from responses parameters to find the dynamic parameter(s) to be extracted:

    • It uses the Expression parameter to find the needed dynamic parameter in the part of the response that the Area parameter specifies.

      If the Expression parameter uses subexpressions, LoadComplete extracts the needed part of the data that the Find parameters | Expression regular expression matches. See Working With Subexpressions.

    • If the Attributes parameter uses subexpressions, LoadComplete extracts the needed data from the Expression parameter.

    If the Find parameters | Expression regular expression matches several dynamic parameters, LoadComplete repeats the step for each match.

  4. LoadComplete uses the Replace in requests parameters to find dynamic parameter(s) to be replaced:

    • It uses the Expression parameter to find the needed dynamic parameter in the part of the response that the Area parameter specifies.

    • If the Expression parameter uses subexpressions, LoadComplete extracts the needed part of the data that the Select from responses | Expression regular expression matches. See Working With Subexpressions.

    • If the Attributes parameter uses subexpressions, LoadComplete extracts the needed data from the Expression parameter.

    If the Find parameters | Expression regular expression matches several dynamic parameters, LoadComplete repeats the step for each match.

  5. LoadComplete applies the Select from responses | Convert rule and then the Replace in requests | Convert rule to the dynamic parameter found in responses, and compares the converted value with the dynamic parameter found in requests.

  6. If the values are the same, LoadComplete correlates the parameter:

    • LoadComplete uses the Select from responses parameters to create a data selector and adds it to the last server response that returns the dynamic parameter in the scenario.

    • LoadComplete uses the Replace in requests parameters to create data replacers and adds them to all requests that use the dynamic parameter.

      Note: Creating global data replacers (applies to the entire scenario) is not supported.
Working With the Dialog

To disable rules

To add a framework

To add a rule

To copy a rule

To remove rules

To import, export and merge rules

Click OK to save the changes and close the dialog. Click Cancel to close the dialog without saving any changes.

Related Topics of Interest

See Also

LoadComplete Options
Data Correlation

Highlight search results