|
拜托各位帮我看看这个问题
我用LR录制了一个注册的脚本,然后将不能重复注册的项进行参数化
设置场景的时候,我设置为10个用户运行一次
结果显示,全部通过,并且查看日志的记录,参数的获取都没有错
可是数据库中却只插入了四条记录,也就是说只有4个虚拟用户是注册成功的,这是为什么呢?
将场景设置为2个用户三次迭代(参数都设置为唯一每次),这时也是4个用户的数据成功插入数据库
lr_think_time(6);
web_url("usertab.do",
"URL=http://192.168.1.241:8080/newspaper/usertab.do?method=toReg",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.1.241:8080/newspaper/index.do?method=index",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=images/login/login_r2_c2.jpg", "Referer=http://192.168.1.241:8080/newspaper/usertab.do?method=toReg", ENDITEM,
LAST);
lr_think_time(82);
web_custom_request("BorouDAO.findByCityId.dwr",
"URL=http://192.168.1.241:8080/newspaper/dwr/call/plaincall/BorouDAO.findByCityId.dwr",
"Method=POST",
"Resource=0",
"RecContentType=text/javascript",
"Referer=http://192.168.1.241:8080/newspaper/usertab.do?method=toReg",
"Snapshot=t4.inf",
"Mode=HTML",
"EncType=text/plain",
"Body=callCount=1\npage=/newspaper/usertab.do?method=toReg\nhttpSessionId=067FF06B99AECD757EAA3A6F5653DD08\nscriptSessionId=DA503ACF959710F5A8C3CDB717DC5DFA328\nc0-scriptName=BorouDAO\nc0-methodName=findByCityId\nc0-id=0\nc0-param0=string:1\nbatchId=0\n",
LAST);
lr_think_time(62);
lr_rendezvous("register");
lr_start_transaction("register");
web_submit_data("usertab.do_2",
"Action=http://192.168.1.241:8080/newspaper/usertab.do?method=regUser&moduleID=2",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.1.241:8080/newspaper/usertab.do?method=toReg",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
"Name=userid", "Value={mobile_no}", ENDITEM,
"Name=yanzhengma", "Value={check_no}", ENDITEM,
"Name=userpass", "Value=123456", ENDITEM,
"Name=qrpass", "Value=123456", ENDITEM,
"Name=username", "Value={user_name}", ENDITEM,
"Name=usersex", "Value=1", ENDITEM,
"Name=idcard", "Value=430024197508052233", ENDITEM,
"Name=birthday", "Value=1975-08-05", ENDITEM,
"Name=usertel", "Value=5613999", ENDITEM,
"Name=useremail", "Value=gutianle@sina.com", ENDITEM,
"Name=aihao", "Value=music", ENDITEM,
"Name=province", "Value=婀栧崡", ENDITEM,
"Name=city", "Value=1", ENDITEM,
"Name=borou", "Value=澶\xA9\xE5績鍖\xBA", ENDITEM,
"Name=jd", "Value=鍔冲姩瑗胯矾", ENDITEM,
"Name=mp", "Value=鏈夎壊澶у帵B鏍\x8B", ENDITEM,
"Name=dy", "Value=405", ENDITEM,
"Name=zip", "Value=410001", ENDITEM,
"Name=findpass", "Value=who am i?", ENDITEM,
"Name=findvalue", "Value=gutianle", ENDITEM,
"Name=checkbox", "Value=checkbox", ENDITEM,
LAST);
lr_end_transaction("register", LR_AUTO);
return 0;
}
[ 本帖最后由 tytesting 于 2009-6-29 14:58 编辑 ] |
|