51Testing软件测试论坛
标题:
lr设置检查点
[打印本页]
作者:
点点点苹果
时间:
2015-5-20 16:02
标题:
lr设置检查点
lr设置检查点来验证用户注册成功否,出现Action.c(48): web_find started [MsgId: MMSG-26355]
Action.c(48): Error -27195: "checkpoint" failed. 0 occurrence(s) of "Tina" found (RightOf=",", LeftOf=",") [MsgId: MERR-27195]
Action.c(48): web_find highest severity level was "ERROR" [MsgId: MMSG-26391],是什么原因???
代码如下:
Action()
{
lr_rendezvous("register together");
lr_start_transaction("register");
web_url("WebTours",
"URL=http://localhost:1080/WebTours/",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_url("sign up now",
"URL=http://localhost:1080/cgi-bin/login.pl?username=&password=&getInfo=true",
"TargetFrame=body",
"Resource=0",
"RecContentType=text/html",
"Referer=http://localhost:1080/WebTours/home.html",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
web_submit_data("login.pl",
"Action=http://localhost:1080/cgi-bin/login.pl",
"Method=POST",
"TargetFrame=info",
"RecContentType=text/html",
"Referer=http://localhost:1080/cgi-bin/login.pl?username=&password=&getInfo=true",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value={password}", ENDITEM,
"Name=passwordConfirm", "Value={password}", ENDITEM,
"Name=firstName", "Value=Tinn", ENDITEM,
"Name=lastName", "Value=lin", ENDITEM,
"Name=address1", "Value=nbfjhr", ENDITEM,
"Name=address2", "Value=09876", ENDITEM,
"Name=register.x", "Value=45", ENDITEM,
"Name=register.y", "Value=8", ENDITEM,
LAST);
web_find("checkpoint",
"What={username}",
LAST);
lr_end_transaction("register", LR_AUTO);
return 0;
}
作者:
saharaqs
时间:
2015-5-20 18:59
看看 web_submit_data("login.pl", 这个页面的response里有没有你要找的那个值
作者:
Lyncent
时间:
2015-5-21 09:12
web_find函数要放在web_submit_data之前
作者:
地壳
时间:
2015-5-21 09:30
web_find函数要放到页面请求函数web_url()之前
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2