运行脚本不能将所有用户成功注册问题
拜托各位帮我看看这个问题我用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 编辑 ] 请提供脚本分析 脚本已附上,请版主看看,谢谢 登陆脚本的sessionid没有参数化就能成功?
你尝试单独执行一遍脚本看成不成功,然后单个脚本两次迭代试试?
另外手机号码这个地方,如果号码相同是不是注册不成功?我看到只有7个参数化的值,不知道实际是多少个,如果手机号太少那么做参数化很有可能取不到足够的值。你又设置成取不到值就用最后一个,结症是不是在这里呢 ? 我们这个系统在注册前可以不要登陆的
单独执行一遍脚本能成功注册一个用户
我的参数总共有100个
不管我是10个用户一次迭代
还是2个用户三次迭代,始终插入到数据库中的就只有四个用户
页:
[1]