51Testing软件测试论坛
标题:
loadrunner录制注册信息
[打印本页]
作者:
xiaobaobao2222
时间:
2016-8-20 21:16
标题:
loadrunner录制注册信息
Action()
{
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTTP",
LAST);
web_url("header.html",
"URL=http://127.0.0.1:1080/WebTours/header.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/",
"Snapshot=t3.inf",
"Mode=HTTP",
LAST);
web_url("welcome.pl",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/",
"Snapshot=t5.inf",
"Mode=HTTP",
LAST);
web_url("home.html",
"URL=http://127.0.0.1:1080/WebTours/home.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true",
"Snapshot=t7.inf",
"Mode=HTTP",
LAST);
web_url("nav.pl",
"URL=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true",
"Snapshot=t8.inf",
"Mode=HTTP",
LAST);
lr_start_transaction("注册");
web_url("sign up now",
"URL=http://127.0.0.1:1080/WebTours/login.pl?username=&password=&getInfo=true",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/home.html",
"Snapshot=t10.inf",
"Mode=HTTP",
LAST);
web_url("button_next.gif",
"URL=http://127.0.0.1:1080/WebTours/images/button_next.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/login.pl?username=&password=&getInfo=true",
"Snapshot=t12.inf",
LAST);
web_reg_find("Fail=NotFound",
"Search=Body",
"SaveCount=注册计数",
"Text=Thank you, <b>{username}",
LAST);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/login.pl?username=&password=&getInfo=true",
"Snapshot=t13.inf",
"Mode=HTTP",
ITEMDATA,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value={password}", ENDITEM,
"Name=passwordConfirm", "Value={passwordConfirm}", ENDITEM,
"Name=firstName", "Value={firstName}", ENDITEM,
"Name=lastName", "Value={lastName}", ENDITEM,
"Name=address1", "Value={address1}", ENDITEM,
"Name=address2", "Value={address2}", ENDITEM,
"Name=register.x", "Value=56", ENDITEM,
"Name=register.y", "Value=5", ENDITEM,
LAST);
//lr_end_transaction("注册", LR_AUTO);
if(atoi(lr_eval_string("{注册计数}"))>0){
lr_end_transaction("注册",LR_PASS);
}
else{
lr_end_transaction("注册", LR_AUTO);
}
return 0;
}
这是提示的错误 -26366: 找不到 web_reg_find 的“Text=Thank you, <b>X01” [MsgId: MERR-26366]
作者:
茄子树上结苹果
时间:
2016-8-21 21:05
找不到检查点
作者:
seagull1985
时间:
2016-8-22 09:06
就是找不到啊。。你可以看下响应里面的body是不是真没有这个检查点里面的内容
作者:
jingzizx
时间:
2016-8-23 06:21
自己调一下
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2