|
本帖最后由 面包树 于 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
麻烦大家帮我看看 |
|