非常感谢云层版主!!!
我还是遇到一点问题。。。请帮忙看一下我哪里做的有错误。。。
我录制的脚本如下:
Action()
{
web_url("auto.pac",
"URL=http://cntproxy01.cnt.creaf.com/auto.pac",
"Resource=1",
"RecContentType=application/x-ns-proxy-autoconfig",
"Referer=",
"Snapshot=t1.inf",
LAST);
web_add_cookie("BAIDUID=D632D05D02FD0AB5E592A4141C197189:FG=1; DOMAIN=www.baidu.com");
web_url("www.baidu.com",
"URL=http://www.baidu.com/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
web_add_cookie("BAIDUID=D632D05D02FD0AB5E592A4141C197189:FG=1; DOMAIN=s.baidu.com");
web_submit_form("s",
"Snapshot=t3.inf",
ITEMDATA,
"Name=wd", "Value=test", ENDITEM,
EXTRARES,
"Url=http://s.baidu.com/w.gif?path=http://www.baidu.com/s?wd=test&t=1207890608601", "Referer=http://www.baidu.com/s?wd=test", ENDITEM,
"Url=http://s.baidu.com/w.gif?tab=2&query=test", "Referer=http://www.baidu.com/s?wd=test", ENDITEM,
LAST);
web_add_cookie("BAIDUID=D632D05D02FD0AB5E592A4141C197189:FG=1; DOMAIN=tieba.baidu.com");
web_add_cookie("BAIDUID=D632D05D02FD0AB5E592A4141C197189:FG=1; DOMAIN=eiv.baidu.com");
web_link("贴吧",
"Text=贴吧",
"Snapshot=t4.inf",
EXTRARES,
"Url=http://eiv.baidu.com/other/ff.js", "Referer=http://tieba.baidu.com/f?kw=test", ENDITEM,
"Url=/static/tb/img/shw1.gif", "Referer=http://tieba.baidu.com/f?kw=test", ENDITEM,
"Url=/static/tb/img/corner.gif", "Referer=http://tieba.baidu.com/f?kw=test", ENDITEM,
"Url=/static/tb/img/vertical.gif", "Referer=http://tieba.baidu.com/f?kw=test", ENDITEM,
"Url=/static/tb/img/tbg.gif", "Referer=http://tieba.baidu.com/f?kw=test", ENDITEM,
"Url=/static/tb/img/fenge.bmp", "Referer=http://tieba.baidu.com/f?kw=test", ENDITEM,
"Url=/static/tb/img/jiaopian.jpg", "Referer=http://tieba.baidu.com/f?kw=test", ENDITEM,
"Url=/static/tb/img/jiaopian2.jpg", "Referer=http://tieba.baidu.com/f?kw=test", ENDITEM,
LAST);
return 0;
}
录制过后我就直接点Run(F5),就会有错误出现。记录如下:
=======回放记录 Replay Log=========
Virtual User Script started
Starting action vuser_init.
Web Turbo Replay of LoadRunner 8.1.0 for WINXP; Web build 4788 [MsgId: MMSG-27143]
Run-Time Settings file: "C:\Documents and Settings\TTT\Local Settings\Temp\noname3\\default.cfg" [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(4): web_url("auto.pac") was successful, 3241 body bytes, 292 header bytes [MsgId: MMSG-26386]
Action.c(12): web_add_cookie was successful [MsgId: MMSG-26392]
Action.c(14): Error -27796: Failed to connect to server "www.baidu.com:80": [10060] Connection timed out [MsgId: MERR-27796]
Action.c(14): web_url("www.baidu.com") highest severity level was "ERROR", 0 body bytes, 0 header bytes [MsgId: MMSG-26388]
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated. |