LoadRunner录制脚本时请关闭360安全卫士,不然会产生多余的web_submit_data(),web_url()脚本。示例如下:
用LR录制打开discuz论坛首页,然后关闭录制,脚本如下:
Action()
{
web_url("forum.php",
"URL=http://192.168.0.90/bbs/forum.php",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=static/image/common/background.png", ENDITEM,
"Url=static/image/common/px.png", ENDITEM,
"Url=static/image/common/newarow.gif", ENDITEM,
"Url=static/image/common/pn.png", ENDITEM,
"Url=static/image/common/nv.png", ENDITEM,
"Url=static/image/common/nv_a.png", ENDITEM,
"Url=static/image/common/search.png", ENDITEM,
"Url=static/image/common/arrwd.gif", ENDITEM,
"Url=static/image/common/titlebg.png", ENDITEM,
"Url=static/image/common/tip_bottom.png", ENDITEM,
"Url=static/image/common/chart.png", ENDITEM,
"Url=static/image/common/qmenu.png", ENDITEM,
"Url=static/image/common/pt_item.png", ENDITEM,
"Url=static/image/common/scrolltop.png", ENDITEM,
LAST);
web_submit_data("check_outchain.php",
"Action=http://qurl.f.360.cn/check_outchain.php",
"Method=POST",
"EncType=multipart/form-data",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=urls", "Value=86a850b9b7a1f2ddb32f9e99d44d9787|b94c6d550d1082ef7c26e0ec94e67f36|8613985ec49eb8f757ae6439e879bb2a|6915b64720078d86269f8574ab84559b|b5920469063d3913127d2ea0658d7ea8|b94c6d550d1082ef7c26e0ec94e67f36|aa425af5465d306ae2d70296f6565d2c\tZGxlYwR2BP4jYwxjCm9ZCj==\n", ENDITEM,
"Name=src", "Value=addrbar", ENDITEM,
"Name=product", "Value=wd", ENDITEM,
"Name=combo", "Value=urlproc", ENDITEM,
"Name=v", "Value=1", ENDITEM,
"Name=vk", "Value=f33c2c84", ENDITEM,
"Name=mid", "Value=0a426117eca7dd80cb5d38beec8ffae6", ENDITEM,
LAST);
web_url("360safeurl",
"URL=http://stat.360safe.com/360safeurl/?type=upnet&mid=0a426117eca7dd80cb5d38beec8ffae6&qn=1&es=0&ea=0&eo=0&rh0=0&rh1=0&rh2=0&rh3=0",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
LAST);
return 0;
}
PS:从函数上可以看出要提交数据到360的服务器上,可能是用来检查网站安全性之类。不过这会不会涉及个人隐私不得而知。