51Testing软件测试论坛
标题:
用户注册时参数化用户名时的问题
[打印本页]
作者:
liufeihengxing
时间:
2011-2-14 11:00
标题:
用户注册时参数化用户名时的问题
用loadrunner测试用户注册,脚本回放的时候不会出现错误,在场景中运行的时候就会出现错误了
作者:
liufeihengxing
时间:
2011-2-14 11:01
脚本如下:
lr_start_transaction("Reg");
//注册事务开始
web_url("CustomerCheck.asp",
"URL=http://192.168.11.244/ennew/SignUp/CustomerCheck.asp?t=0&TheNewName={username}@sunivo.com&rd=2",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.11.244/ennew/SignUp/CusReg.asp",
"Snapshot=t12.inf",
"Mode=HTML",
LAST);
web_url("CustomerCheck.asp_2",
"URL=http://192.168.11.244/ennew/SignUp/CustomerCheck.asp?t=1&TheNewName={username}@sunivo.com&rd=2",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.11.244/ennew/SignUp/CusReg.asp",
"Snapshot=t13.inf",
"Mode=HTML",
LAST);
web_url("spraydata.asp",
"URL=http://192.168.11.244/ennew/spraydata.asp",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.11.244/ennew/SignUp/CusReg.asp#",
"Snapshot=t14.inf",
"Mode=HTML",
LAST);
//lr_start_sub_transaction( "register","reg" );//注册提交事务开始
web_reg_find("Search=Body",
"SaveCount=counts",
"Text=Thank you for registering on SUNIVO",
LAST);
lr_rendezvous("register");
lr_start_sub_transaction("register","Reg");
web_submit_data("CusReg.asp_2",
"Action=http://192.168.11.244/ennew/SignUp/CusReg.asp",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.11.244/ennew/SignUp/CusReg.asp",
"Snapshot=t15.inf",
"Mode=HTML",
ITEMDATA,
"Name=CuC_LoginName", "Value={username}@sunivo.com", ENDITEM,
"Name=CuC_CountryID", "Value={countryid}", ENDITEM,
"Name=Cup_firstName", "Value={fname}", ENDITEM,
"Name=Cup_lastname", "Value={lname}", ENDITEM,
"Name=CuP_Tel_Country", "Value=86", ENDITEM,
"Name=CuP_Tel_Area", "Value=21", ENDITEM,
"Name=CuP_Tel_Phone", "Value={telephone}", ENDITEM,
"Name=textfield", "Value=", ENDITEM,
"Name=Cuc_CompanyName", "Value={CompanyName}", ENDITEM,
"Name=CuP_Password", "Value=123456", ENDITEM,
"Name=CuP_Password2", "Value=123456", ENDITEM,
"Name=Cup_comeThrough", "Value={through}", ENDITEM,
"Name=btnGysReg", "Value=Submit", ENDITEM,
"Name=Submit1", "Value=", ENDITEM,
LAST);
if(atoi(lr_eval_string("{counts}"))>0)
lr_end_sub_transaction("register",LR_PASS);
else
lr_end_sub_transaction("register",LR_FAIL);
lr_end_transaction("Reg", LR_AUTO);
//lr_end_transaction("reg", LR_AUTO);
//注册事务结束
作者:
liufeihengxing
时间:
2011-2-14 11:04
请问是不是在username参数化的时候,参数的取值设置有问题啊?我取值的是Sequential,Each iteration.
请各位高手帮帮忙·········
作者:
jarystar
时间:
2011-2-15 13:03
回复
3#
liufeihengxing
报的什么错?怎么解决的?
作者:
liufeihengxing
时间:
2011-2-18 16:03
回复
4#
jarystar
没有报错啊~·就是只有失败的事务,还没有解决呢
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2