51Testing软件测试论坛
标题:
登录脚本参数化,文本检查点出现异常
[打印本页]
作者:
15151689848
时间:
2016-1-7 08:26
标题:
登录脚本参数化,文本检查点出现异常
选择三组账号,第一组账号正确的,第二组账号是正确的,第三组账号是错误的。现在不用参数化,正确脚本提示都是参数值为1,错误的提示参数为0;现在使用参数化,第一组数据成功提示参数为1,接下来两组数据都提示参数为8。我很郁闷 脚本贴在下面。login()
{
lr_rendezvous("login_together");
lr_think_time(78);
lr_start_transaction("login");
web_submit_data("login",
"Action=http://10.10.1.212:5980/syzksitepro/actions/examinee/login",
"Method=POST",
"RecContentType=text/json",
"Referer=http://10.10.1.212:5980/syzksitepro/actions/home",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=idCard", "Value={idCard}", ENDITEM,
"Name=password", "Value={password}", ENDITEM,
"Name=captchaCode", "Value=abcd", ENDITEM,
LAST);
web_reg_find("Text=span3","Savecount=para_count",LAST);
web_url("index",
"URL=http://10.10.1.212:5980/syzksitepro/actions/secured/examinee/index",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=/syzksitepro/staticmedia/css/bootstrap/img/glyphicons-halflings.png", ENDITEM,
LAST);
if (atoi(lr_eval_string("{para_count}"))>0)
lr_output_message("login Pass!");
else
lr_output_message("login Failed");
lr_end_transaction("login", LR_AUTO);
return 0;
}
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2