51Testing软件测试论坛

标题: loadrunner的关联功能问题~~~~~~ [打印本页]

作者: y122025    时间: 2004-11-11 20:39
标题: loadrunner的关联功能问题~~~~~~
loadrunner的关联功能有什么作用啊,什么情况下使用??
大虾,斑竹帮忙解答拉~~~~~~~~~~~~
作者: johnbear    时间: 2004-11-12 10:57
标题: 先看一下帮助吧。
在帮助中输入Correlation,有详细解释。参见后面的Case

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:

"http://host//cgi-bin/purchase.cgi?date=170397&ID=1234"

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
关联的作用 :从服务器返回的信息里获得动态数据,保存到变量里,以备后续脚本使用。




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2