Create a reference or field reference
Overview
When you designate a test value as a reference, or a set of test data as a field reference, you can use the data elsewhere in the test.A reference, typically located in response data, points to a specific value to use in a subsequent test location, typically a request.
You can...
- Substitute a request value with a reference
- Use a reference as input to an IF-THEN condition
- Use a reference as input to custom Java code
A field reference points to an entire block of test data. For example, an entire HTTP response could be designated as a field reference. You can use a field reference as input to custom Java code.
You can create references and field references in these fields:
- Response Headers | Value
![]()
- Response Content | Content
![]()
You can create field references in these fields:
- Status
- Reason
![]()
Create a reference or field reference
- In the Test Navigator, browse to the test, and double-click it.
- Locate the value or set of data to designate as a reference or field reference.
- For response content references, highlight the value.
![]()
For response header contents, click the row in the Response Headers table, and then click Modify.
![]()
- Right-click, and then click Create Reference.
![]()
The value is highlighted in light blue to indicate that it is an unused reference.
![]()
When you use it, the highlight changes to dark blue. The reference is given a name automatically.
To see the name of the reference, right-click the value and then select Properties.
- To create a field reference, do not highlight the value. Instead, right-click, and then click Create Field Reference.
- Field references are not automatically given names.
To name a field reference, right-click the field reference, and then select Properties. Type a name in the Name field, and then click OK.
The entire field is highlighted in yellow to indicate that it is a field reference.
Related
- Data correlation overview
- Test data sources overview
- Guidelines for adjusting data correlation
- Viewing data correlation
- Correlating multiple fields in a test
- Disabling data correlation
- Re-correlating test data