|
为什么Discuz论坛注册,脚本增强运行后成功,但到后台把用户信息删除后,再次运行注册脚本为Failed(同样的脚本)
但Test Results:所有的都Pass,没有Failed
脚本代码:
web_reg_find("Search=Body",
"SaveCount=Checked_Count",
"Text={TestName}",
LAST);
//插入注册检查点
web_add_cookie("bPh5_2132_lastact=1368537781%09forum.php%09ajax; DOMAIN=127.0.0.1");
lr_rendezvous("Register");
//插入集合点
lr_start_transaction("Register");
//插入开始事务
//提交注册信息
web_submit_data("member.php",
"Action=http://127.0.0.1:8081/upload/member.php?mod=register&inajax=1",
"Method=POST",
"EncType=multipart/form-data",
"TargetFrame=",
"RecContentType=text/xml",
"Referer=http://127.0.0.1:8081/upload/member.php?mod=register",
"Snapshot=t6.inf",
"Mode=HTML",
ITEMDATA,
"Name=regsubmit", "Value=yes", ENDITEM,
"Name=formhash", "Value=a5b639f9", ENDITEM,
"Name=referer", "Value=forum.php", ENDITEM,
"Name=activationauth", "Value=", ENDITEM,
"Name=Oe2dU9", "Value={TestName}", ENDITEM,
"Name=xHj1J2", "Value=123", ENDITEM,
"Name=UpvMz1", "Value=123", ENDITEM,
"Name=r1wfoG", "Value={TestName}@qq.com", ENDITEM,
LAST);
if(atoi(lr_eval_string("{Checked_Count}"))>0)
{
lr_output_message("UserName : %s, register Successful!", lr_eval_string("{TestName}"));
//注册查找成功输出Successful
lr_end_transaction("Register", LR_PASS);
}
else
{
lr_output_message("UserName :%s, register Fail!", lr_eval_string("{TestName}"));
//注册查找失败输出Failed
lr_end_transaction("Register", LR_FAIL);
}
错误代码:
Action.c(110): Notify: Transaction "Register" started.
Action.c(115): Registered web_reg_find successful for "Text=test6" [MsgId: MMSG-26362]
Action.c(115): web_submit_data("member.php") was successful, 343 body bytes, 467 header bytes [MsgId: MMSG-26386]
Action.c(145): UserName :test6, register Fail!
Action.c(147): Notify: Transaction "Register" ended with "Fail" status (Duration: 1.1863 Wasted Time: 0.0025). |
|