If a test runs without error
but does not generate the results that you expect, you might need
to correlate a value in a request with other test data.
You can correlate a request value with the following types of test data:
- References
- Datasets
- Custom code
- Test variables
- Built-in datasources
For example, if you recorded a test and searched on a date, you might want to substitute the
built-in data source Current Date so that the test will search on the playback
date, not on the recorded date. For information on the different types of test data, see Test data sources overview.
- In the Test Navigator, browse to the
test, and double-click it. The test opens in the test editor.
- Locate the value that the other test data will replace.
- Highlight the value: Press and hold the left mouse button
and drag your mouse over the value.
-
In the Test Data Sources window, click the appropriate tab:
References, Datasets, Custom
Code, Test Variables, or Built-in
Datasources. To see all references, clear the Matching Only check
box.
- In the Test Data Sources window, select
the test data to use. For references and custom code, you can double-click
the entry in the Test Data Sources window to
find the data source in the test editor.
- Click Substitute From.
The value is shown in purple text to indicate that it
has been correlated and the correlation is added to the Test Data
table, which contains the substitution sites for the page.