Skip to main content

Hints and Tips

Read the web Best Practices topic.

Correlating and Parameterizing Unique Values Used by Web Servers

Unique values, such as session IDs, are used by web servers to maintain state or to validate client requests. They are generated in a number of ways, either by the client or the server. Some of these will be automatically correlated by Eggplant Performance using its cookie handling and auto correlation features. For other occasions you will find the following tips useful.

Unique values can be found:

  • Embedded within the HTML of a web page either as a hidden form field or as part of a dynamically generated link. You can use the API call extract() to collect the value from the web page.
  • Within a cookie. Although handled automatically, some cookie values must be correlated for use outside the context of the cookie, for example, for use in an element of a URL. Cookie values can be collected from the VU's cookie cache using getCookieValue().
  • Generated by JavaScript on the client. Web virtual users (VUs) are not real clients and as such do not execute JavaScript. The only way to generate such a value is to replicate the JavaScript using web VU script code.

You also can use Script Generation Rules to correlate values in your testing.