Creating a reference using data correlation rules

You can create a data correlation rule that creates reference from a regular expression when the rule is applied to test data.

Procedure

  1. Open a data correlation rule set in the rules editor. A new rule set contains one empty rule pass.
  2. Click Insert, and then select Create reference. An empty Create reference rule is inserted in the rule pass.
  3. Under Details, supply information for all fields that are marked with asterisks and shaded in red. For Attribute, click the down arrow to select the attribute in which to create the reference. Use the push buttons at the top of the window to select a protocol, and then select an attribute. To create a reference in the content field of an HTTP response, click the down arrow, and then click HTTP > Content.
  4. In Regular expression type an expression to use to locate the reference. If only a part of the regular expression is required for a reference, enclose that part in parentheses.
    1. Open the test and locate the request where you want to create the reference.
    2. Copy the text from the request to the clipboard.
    3. In the rules editor, click the Toggle regular expression assistant push button to open the regular expression assistant.
    4. Paste the text from the clipboard to the Test regular expression page of the regular expression assistant window. If the Test regular expression page is empty, the contents of the clipboard is automatically pasted in.
    5. Click the Captured group tab in the regular expression assistant. The overall group is displayed, and the captured groups are displayed. If no groups are displayed, edit the regular expression accordingly.
  5. In Base name provide a name for the reference.
  6. Optional: If the regular expression matches multiple groups, in Value group, type or select the index of the value group to use to create the reference.
  7. Under Remove overlap, select true to create a reference even if the new reference overlaps with other references. The other references are removed. Select false to prevent a reference from being created if the new reference would overlap with a current reference.
  8. If an attribute contains multiple matches for the regular expression, in Occurrence type or select the occurrence to use to create the reference.
  9. In Log level, select the level of error data to be written to the error log. Logging lets you see which rules worked and which did not. When you are debugging data correlation rules, use the Action and Detail log levels. Typically, when you are sure the data correlation rules that you have written work correctly, use the None or Summary log levels to reduce memory and disk-space consumption and unnecessary entries in the error log.
    Option Description
    None Nothing is logged.
    Summary One message is logged for the rule, no matter how many times the rule is applied.
    Action A message is logged every time the rule is applied.
    Detail A detailed message is logged every time the rule is applied.
  10. In Label, type a label for the rule. If you do not type a label name, the rule is given a default name. The default name is the base name with the regular expression appended.
  11. In Description, describe the rule. Descriptions can be useful if you share rule set files with other testers.

Feedback