|
要求:做一个登陆的并发测试,切插入文本校验。
Action()
{
/*登陆智能分析平台*/
lr_rendezvous("并发");
web_reg_find("Text=欢迎页面",
"Search=body",
LAST);
web_submit_data("index.php",
"Action=http://192.168.2.140/unicom/index.php?controller=HBUNICOMControlLogin&action=login",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.2.140/unicom/",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=PHPSESSID", "Value=c80462a5baa8d81ed3074a1eda09e709", ENDITEM,
"Name=UserName", "Value={logonname}", ENDITEM,
"Name=PassWord", "Value={logonpsw}", ENDITEM,
"Name=Submit.x", "Value=51", ENDITEM,
"Name=Submit.y", "Value=10", ENDITEM,
EXTRARES,
"URL=js/modalfiles/blackdot.gif", "Referer=http://192.168.2.140/unicom/index.php?controller=HBUNICOMControlDashboard&action=index", ENDITEM,
"URL=images/topnav-bg.gif", "Referer=http://192.168.2.140/unicom/index.php?controller=HBUNICOMControlDashboard&action=topnav", ENDITEM,
"URL=images/topnav-logo.gif", "Referer=http://192.168.2.140/unicom/index.php?controller=HBUNICOMControlDashboard&action=topnav", ENDITEM,
"URL=images/treebg.gif", "Referer=http://192.168.2.140/unicom/index.php?controller=HBUNICOMControlDashboard&action=sidebar", ENDITEM,
"URL=images/pnabtree.jpg", "Referer=http://192.168.2.140/unicom/index.php?controller=HBUNICOMControlDashboard&action=sidebar", ENDITEM,
"URL=images/foxmenu_bg-OFF.gif", "Referer=http://192.168.2.140/unicom/index.php?controller=HBUNICOMControlDashboard&action=sidebar", ENDITEM,
LAST);
return 0;
}
要求根据”欢迎页面“这个字符串来判断脚本编写是否正常,即登陆是否成功或失败
[ 本帖最后由 alphalion 于 2010-4-14 17:37 编辑 ] |
|