Data correlation
Overview
Requests can include data returned in the response to a previous request. Associating data in this manner is called data correlation.For example...
- A user pulls up a web application and logs in.
- The Web server returns...
- Page indicating that login has succeeded
- Unique session ID to the Web browser that the user is using
- On the home page, the user clicks a link to open a page for searching the employee database.
The Web browser includes the session ID when sending the request. Based on the session ID, the Web server knows that the request comes from someone who is already logged on, and so opens the search form for the employee database. The user then searches for a specific employee. The Web server returns a photograph of that employee and the employee's unique ID.
- The user clicks a link that requests the Web server to return the payroll record for the employee.
With this request, the Web browser sends two IDs:
session ID Web server knows that the request comes from some who is logged on employee ID Web server can locate and return the correct information In this example, request 2 depends on request 1, and request 3 depends on requests 1 and 2.
If you record these interactions in a test, before running the test with multiple users, you would vary the test data.
For example, replace the user name and password values, the employee name search values, or both, with datapool values. When you run the test, each virtual user returns a different employee payroll record, based on the contents of the datapools.
In a generated test, where data in a request depends on data contained in the response to a previous request, the request data is substituted from the response data on which it depends.
The term for this internal linking of response and request data is data correlation.
A reference is a value in a test (typically in a response) that can be used by a subsequent value in the test (typically in a request). When the test generator detects that a request value must be substituted from a previous value, it designates the earlier value as a reference and correlates the subsequent request value with the reference. This is called automated data correlation.
You can also manually correlate any two values in a test, or unlink existing correlations.
Disable automated data correlation
To change or disable automated data correlation...
Window | Preferences | Test | Test Generation
Color coding
In the test editor, in the Test Data table for a page...
Datapool candidates Green text on a light green background Values associated with a datapool White text on a green background References Blue text
If correlated data is not displayed, right-click the table and verify that Show References is selected.
To navigate directly to a page request containing correlated data, double-click a table row.
To associate correlated data from the table with a datapool...
- Click the row
- Click Substitute
- Click Select Data Source
You can also use the Test Data Sources view to perform substitutions. In the test editor....
- Right-click the Test Data table
- Select Link with Test Data Sources View
The Test Data Sources view displays information about the selected substitution site.
Color coding
Page requests containing datapool data yellow highlight Candidates green text References blue text
When you click a highlighted request...
datapool candidates highlighted in light green data that is associated with a datapool highlighted in dark green correlated data highlighted in red If you right-click a value for correlated data, as shown in the example, you can then click Go
To to see its reference:
References are highlighted with white text and dark blue background. Darker blue is a selected reference.
Related
- Test data sources overview
- Guidelines for adjusting data correlation
- Viewing data correlation
- Create a reference or field reference
- Correlating multiple fields in a test
- Disabling data correlation
- Re-correlating test data
- Demo: Using Data Correlation with IBM Rational Performance Tester
- Demo: Using datapools with IBM Rational Performance Tester