51Testing软件测试论坛
标题:
LR中测试“注册”功能的脚本问题
[打印本页]
作者:
面包树
时间:
2010-10-8 16:51
标题:
LR中测试“注册”功能的脚本问题
本帖最后由 面包树 于 2010-10-8 17:06 编辑
在LR中,测试一个网站的“注册”过程,报错了。代码如下:麻烦大家帮我看看
Action()
{
lr_rendezvous("同时登录注册");//加入集合点
lr_start_transaction("登录注册事物");//登录注册事物开始
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTML",
LAST);
web_submit_form("login.pl",
"Snapshot=t6.inf",
ITEMDATA,
"Name=username", "Value=liming", ENDITEM,
"Name=password", "Value=1", ENDITEM,
"Name=passwordConfirm", "Value=1", ENDITEM,
"Name=firstName", "Value=li", ENDITEM,
"Name=lastName", "Value=ming", ENDITEM,
"Name=address1", "Value=wrwe", ENDITEM,
"Name=address2", "Value=sfsfe", ENDITEM,
"Name=register.x", "Value=87", ENDITEM,
"Name=register.y", "Value=10", ENDITEM,
LAST);
web_image("button_next.gif",
"Src=/WebTours/images/button_next.gif",
"Snapshot=t7.inf",
LAST);
web_find("检查点",
"what={username}",
LAST);//加入文本检查点
lr_end_transaction("登录注册事物",LR_AUTO);//登录注册事物结束
return 0;
}
在lr_end_sub_transaction("登录注册事物",LR_AUTO);//登录注册事物结束 有错误,提示如下:
Action.c (41): illegal character `\0243'
Action.c (41): illegal character `\0254'
Action.c (41): syntax error; found `2' expecting `)'
Action.c (41): insufficient number of arguments to `lr_end_sub_transaction'
Action.c (41): syntax error; found `2' expecting `;'
Action.c (41): syntax error; found `)' expecting `;'
Action.c (41): illegal statement termination
Action.c (41): skipping `)'
d:\\program files\\hp\\loadrunner\\scripts\\flight10082\\\\combined_flight10082.c (5): 8 errors, not writing pre_cci.ci
麻烦大家帮我看看
作者:
baikunhu
时间:
2010-10-9 09:21
怀疑你设置的检查点有问题
web_find("检查点",
"what={username}",
LAST);//加入文本检查点
http://bbs.51testing.com/viewthr ... =%BC%EC%B2%E9%B5%E3
看看这个,是否有帮助
作者:
msnshow
时间:
2010-10-31 21:32
语法错误了,像是哪少了分号
作者:
msnshow
时间:
2010-11-2 22:52
不一定是当前位置语法错误,LR的提示不太智能
作者:
dfgvdf
时间:
2010-11-3 21:51
mk
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2