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.
Selecting a reference in a response
When a response contains
multiple matches for the regular expression that defines a reference,
you can select which match is used subsequently as the data source.
You can specify a particular occurrence, or you can specify a random
occurrence.
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.
Finding data correlation errors
You can use the Potential Correlation Errors view
to find missing or incorrect data correlations.
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.
Recorrelating test data
If you disabled automatic data correlation before recording
a test, you can regenerate the test with automatic data correlation
enabled.
Running a test from the command line
You can run a test from the command line outside of the Eclipse workspace and automatically export
the results.