Understanding the Correlation Options
Correlation allows you to save dynamic values during test execution. These settings let you configure the extent of automatic correlation performed by VuGen while recording. All of correlation options are disabled by default. The Correlation options only apply to the VBScript and JScript languages.
Case 1
Suppose a Web page contains a hypertext link with text: "Buy me now!" When you record a script with HTTP data, the URL is recorded by VuGen as:
Since the date "170397" and ID "1234" are created dynamically during recording, each new browser session recreates the date and ID. When you run the script, the link "Buy me now!" is no longer associated with the same URL that was recorded—but with a new one. The Web server is therefore unable to retrieve the URL.
Case 2
Consider a case where a user fills in his name and account ID into a form, and then submits the form.
When the form is submitted, a unique serial number is also sent to the server together with the user's data. Although this serial number is contained in a hidden field in the HTML code, it is recorded by VuGen into the script. Because the serial number changes with each browser session, LoadRunner is unable to successfully replay the recorded script.
You can use correlated statements to resolve the difficulties in both of the above cases. Replace the dynamic data in the recorded script with one or more parameters. When the script runs, LoadRunner assigns parameter values.作者: oftime999 时间: 2007-6-2 17:23
关联的作用 :从服务器返回的信息里获得动态数据,保存到变量里,以备后续脚本使用。