Share this page

# Correlate scripts

This section describes how to correlate recorded functions in your Vuser script.

## Correlation overview

Web pages sent from the server to the browser often contain dynamic data that the client must return in later requests. The process of locating, extracting, and replacing recorded dynamic values with values valid at replay is called correlation.

Common examples of dynamic data are:

- Session ID
- Timestamp
- Customer ID
- Authentication token

This information generally becomes invalid when the session is completed. At the next session, the same items are sent, but the values are different.

After recording the business process, the script might contain dynamic values in the arguments of the generated API functions. When the script is replayed, these recorded values are sent to the server. However, the web server rejects them because they are not valid in the replay session. Generally, when this happens, the test fails.

Example of a dynamic value as received from the server and as it appears in the recorded script:

Response Body

Resulting script

To enable successful replay, the script must:

- Locate the dynamic data in the server responses, including headers.
- Extract and save that dynamic data.
- Replace the hard-coded dynamic data from the recording session with the data from the current replay session.

Dynamic data is located using boundaries definitions, regular expressions, attributes, XML queries, or JSON queries as appropriate. The data is extracted and the value is saved to a parameter. The parameter is used instead of the recorded value in later requests to the server.

Some of the correlation is handled automatically by VuGen. You can configure the automatic correlations. For more information on how to configure VuGen to handle correlations, see Automatic correlation and Automatic correlation configuration.

Dynamic data that is not correlated automatically requires your intervention. For more information, see Manually correlate scripts and Design Studio.

If the script still fails on correlation problems, you can use the advanced techniques. For more information, see Advanced correlation techniques.

Note: Although parametrization and correlation both use OpenText Professional Performance Engineering parameters, the purpose is different.

- Parameterization is used to vary the requests based on a list of values you provide. Parameterization is not dependent on preceded responses from the server.
- Correlation uses data from the server in subsequent requests so that the server does not reject the request.

## See also

- Use VuGen

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 26.1-26.3 All View Local Help Center View Online Help Center Version: