|
我录制了一个B/S结构的学生实验系统,用户注册这部分的脚本,我想看下30个用户并发提交时数据库的性能情况,主要是响应时间和吞吐量方面,我的设置了一个集合点并在"定义场景"中设置 等Vuser到达30个是同时提交,脚本如下:
Action()
{
lr_think_time(6);
web_url("RegisterServlet",
"URL=http://192.168.3.13:8080/RegisterServlet",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
lr_rendezvous("submit_user");//集合点
web_submit_form("AddStudent",
"Snapshot=t3.inf",
ITEMDATA,
"Name=userID", "Value={UserParam}", ENDITEM,
"Name=userName", "Value={NameParam}", ENDITEM,
"Name=userpwd", "Value=654321", ENDITEM,
"Name=userpwd2", "Value=654321", ENDITEM,
"Name=userIns", "Value=软件学院", ENDITEM,
"Name=userspc", "Value=软件设计", ENDITEM,
"Name=userGread", "Value=2005", ENDITEM,
"Name=userClass", "Value=1", ENDITEM,
LAST);
return 0;
}
我将userID和userName参数化,从数据库里读,我数据库表和我LR参数化如下图:
file:///C:/Documents%20and%20Settings/Administrator/My%20Documents/param.jpg
file:///C:/Documents%20and%20Settings/Administrator/My%20Documents/papram2.jpg
数据库表:
file:///C:/Documents%20and%20Settings/Administrator/My%20Documents/sql.jpg
我参数正确从数据库读取了,但我在controller中运行完场景后,我却在Vuser中看到这样的情况(注意红框处):
file:///C:/Documents%20and%20Settings/Administrator/My%20Documents/vuserout.jpg
大家可以看到有些值不是我参数化的值,这些值是我上星期测试时输入的,为什么在今天的Vuser日志中出现?
而且还有就是我参数化的那些值并没有真正的在学生实验系统中注册成功(因为我运行完成后用这些值常识登陆,结果提示的是用户不存在)
这是怎么回事?难道装载脚本运行场景时,脚本内容不会真正的执行注册吗?
场景目标设置如下(加载行为为:自动):
file:///C:/Documents%20and%20Settings/Administrator/My%20Documents/cj.jpg
图有点多,不知道我的意思表达清楚没?等待各位前辈的指点 |
|