Example: Linking substitutions to references with rules
You can create data correlation
rules to link substitutions to references.
About this task
If you are familiar with the application under test and know the exact location of the reference in the response data, write a Create a reference rule that uses a regular expression to locate the reference data, and then insert a Create a substitution rule as a child of the Create a reference rule.
Procedure
- Open a data correlation rule set in the rules editor. A new rule set contains one empty rule pass.
- Create a Create a reference rule. See Creating a reference using data correlation rules to learn more about creating a Create a reference rule.
- Right-click the Create a reference rule, and then click .
- Right-click the Link with substitutions rule, and then click . To use the value of the reference that is extracted by the parent rule, type %refname% for the Regular expression, where refname is the name of the reference that is created by the parent rule. See Creating a substitution with data correlation rules to learn more about creating a Create substitution rule. A Create a substitution rule is inserted as a child of the Link with substitutions rule.