|
小弟最近才接触LoadRunner,做了一个简单的测试脚本,但疑惑的该脚本5个用户执行时参数的取值都一样,都是参数列表里的第一个值,小弟也翻了不少资料,但试了好多种参数设置都不行 。
附上脚本和参数文件:
/* -------------------------------------------------------------------------------
Script Title :
Script Description :
Recorder Version : 1196
------------------------------------------------------------------------------- */
vuser_init()
{
web_url("kqgl",
"URL=http://10.10.62.6:8080/kqgl",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t10.inf",
"Mode=HTML",
LAST);
web_link("系统登录",
"Text=系统登录",
"Snapshot=t11.inf",
LAST);
return 0;
}
Action()
{
web_submit_data("kqglservlet",
"Action=http://10.10.62.6:8080/kqgl/kqglservlet",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.10.62.6:8080/kqgl/kqgl/xtdl.jsp",
"Snapshot=t14.inf",
"Mode=HTML",
ITEMDATA,
"Name=t_czlx", "Value=xtdl", ENDITEM,
"Name=t_czlx_tmp", "Value=2", ENDITEM,
"Name=xtlx", "Value=", ENDITEM,
"Name=fc401", "Value={name}", ENDITEM,
"Name=fc402", "Value={password}", ENDITEM,
LAST);
web_url("index_top.jsp",
"URL=http://10.10.62.6:8080/kqgl/kqgl/index_top.jsp?leftrefresh=1",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.10.62.6:8080/kqgl/kqgl/index.htm",
"Snapshot=t15.inf",
"Mode=HTML",
LAST);
web_url("oa_main_left.jsp",
"URL=http://10.10.62.6:8080/kqgl/dtree/oa_main_left.jsp?leftrefresh=1",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.10.62.6:8080/kqgl/kqgl/index.htm",
"Snapshot=t16.inf",
"Mode=HTML",
LAST);
return 0;
}
vuser_end()
{
web_url("kqglservlet_2",
"URL=http://10.10.62.6:8080/kqgl/kqglservlet?t_czlx=xtzx",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.10.62.6:8080/kqgl/kqgl/index_top.jsp?leftrefresh=1",
"Snapshot=t22.inf",
"Mode=HTML",
LAST);
web_url("index_top.jsp_2",
"URL=http://10.10.62.6:8080/kqgl/kqgl/index_top.jsp?leftrefresh=1",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.10.62.6:8080/kqgl/kqgl/index.htm",
"Snapshot=t23.inf",
"Mode=HTML",
LAST);
web_url("oa_main_left.jsp_2",
"URL=http://10.10.62.6:8080/kqgl/dtree/oa_main_left.jsp?leftrefresh=1",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.10.62.6:8080/kqgl/kqgl/index.htm",
"Snapshot=t24.inf",
"Mode=HTML",
LAST);
web_url("xtdl.jsp",
"URL=http://10.10.62.6:8080/kqgl/kqgl/xtdl.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.10.62.6:8080/kqgl/kqgl/index.htm",
"Snapshot=t25.inf",
"Mode=HTML",
LAST);
return 0;
}
参数文件:
name.dat:
huangh
changgr
caoyj
zyz
sunj
password:
******
***
****
***
**** |
|