For a test to run correctly, a request
that is sent to a server might need to use a value that was returned by a
previous request. By ensuring that this data is correlated accurately, you
can produce better performance tests.
Data correlation overview
A request can include data
that was returned in the response to a previous request. Associating
data in this manner is called data correlation.
Viewing data correlation
You can switch between viewing
all test elements in the test editor and viewing only elements related
to data correlation in the test editor. Viewing only data correlation
elements makes it easier to add and remove substitutions.
Test data sources overview
Use the Test Data
Sources window to add or change data correlation for any
supported test element.
Creating a reference or field reference
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.
Correlating multiple fields in a test
Some tests are structured in such a way that you must correlate
multiple fields. For example, assume that you want to datapool an
item that a virtual user is buying. For the test flow to be correct,
you must also datapool all occurrences of that item in the test. You
can find and correlate all instances of that item in one procedure.
Guidelines for adjusting data correlation
When you run a test, you might notice that the server is
not under the expected load or that your database is not being updated
as expected. Incomplete or incorrect data correlation can cause these
problems.
Disabling data correlation
You can disable a data correlation source or a substitution
site. When you disable a data source, none of the substitution sites
that use the source will be correlated when you run tests. When you
disable a substitution site, only that specific substitution site
is disabled. Other substitution sites that use the same reference
will be correlated when you run tests. You can also disable data correlation
entirely for subsequent tests that you record.
Re-correlating test data
If you disabled automatic data correlation before recording
a test, you can regenerate the test with automatic data correlation
enabled.