|
我所测试的网站:http://www.fjgsgg.com/zfbz.asp(这其实是网站http://www.fjgsgg.com的一个版块,别的版块我不需要,所以就只测试这个版块)
我录制的代码:- Action()
- {
- char leon[50];
- long file;
- web_url("wpad.dat",
- "URL=http://202.98.24.121/wpad.dat",
- "Resource=0",
- "RecContentType=text/html",
- "Referer=",
- "Snapshot=t1.inf",
- "Mode=HTML",
- LAST);
- web_url("zfbz.asp",
- "URL=http://www.fjgsgg.com/zfbz.asp",
- "Resource=0",
- "RecContentType=text/html",
- "Referer=",
- "Snapshot=t2.inf",
- "Mode=HTML",
- LAST);
- lr_think_time(8);
- web_reg_save_param("leon","LB=距离为","RB=公里",LAST);
- web_submit_form("zfbz.asp_2",
- "Snapshot=t3.inf",
- ITEMDATA,
- "Name=names1", "Value=闽浙省际", ENDITEM,
- "Name=names2", "Value=福鼎", ENDITEM,
- "Name=B1", "Value=查询", ENDITEM,
- LAST);
- file=fopen("d://1.txt","at+");
- fputs(leon,file);
- fclose(file);
- return 0;
- }
复制代码 其中:web_reg_save_param("leon","LB=距离为","RB=公里",LAST);和
file=fopen("d://1.txt","at+");
fputs(leon,file);
fclose(file);是我自己后加的,我想把查询表单后的结果写入一个文件当中,我在执行的时候有两个Waring:
Action.c(14): Warning -26627: HTTP Status-Code=404 (Not Found) for "http://www.fjgsgg.com/main.files/bg_right300.gif" [MsgId: MWAR-26627]( 指向这行:web_url("zfbz.asp",)
Action.c(26): Warning -26627: HTTP Status-Code=404 (Not Found) for "http://www.fjgsgg.com/main.files/bg_right300.gif" [MsgId: MWAR-26627](指向这行:web_submit_form("zfbz.asp_2",)
完整的日志如下:
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\liupeng\Local Settings\Temp\noname7\\default.cfg" [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(5): Redirecting "http://202.98.24.121/wpad.dat" (redirection depth=0) [MsgId: MMSG-26694]
Action.c(5): To location "http://jldns1.cncmax.cn:8080?HOST=202.98.24.121&R=/wpad.dat&" [MsgId: MMSG-26693]
Action.c(5): Detected non-resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/index.jsp?sf=&UserUrl=202.98.24.121" in "http://jldns1.cncmax.cn:8080?HOST=202.98.24.121&R=/wpad.dat&" [MsgId: MMSG-26574]
Action.c(5): Detected non-resource "http://jldns1.cncmax.cn:8080/counter/counter.jsp?pc=50004&dn=202.98.24.121&ip=222.161.31.58" in "http://jldns1.cncmax.cn:8080?HOST=202.98.24.121&R=/wpad.dat&" [MsgId: MMSG-26574]
Action.c(5): Redirecting "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/index.jsp?sf=&UserUrl=202.98.24.121" (redirection depth=0) [MsgId: MMSG-26694]
Action.c(5): To location "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/self.jsp?UserUrl=202.98.24.121" [MsgId: MMSG-26693]
Action.c(5): Found resource "http://unstat.baidu.com/code/js/fyb_2.js" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/self.jsp?UserUrl=202.98.24.121" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://partner.googleadservices.com/gampad/google_service.js" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/self.jsp?UserUrl=202.98.24.121" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/css/index.css" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/self.jsp?UserUrl=202.98.24.121" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/img/lg-cnc.gif" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/self.jsp?UserUrl=202.98.24.121" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/img/lg-bd2.gif" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/self.jsp?UserUrl=202.98.24.121" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://utk.baidu.com/usv/uc.sv?pe=EFCc2ztgnU7Wvv7U9f0WKSRp&sn=7232&an=463523&rn=168" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/self.jsp?UserUrl=202.98.24.121" [MsgId: MMSG-26659]
Action.c(5): Detected non-resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/left.html" in "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/self.jsp?UserUrl=202.98.24.121" [MsgId: MMSG-26574]
Action.c(5): Found resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/images/ad1.jpg" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/self.jsp?UserUrl=202.98.24.121" [MsgId: MMSG-26659]
Action.c(5): Detected non-resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/regular/bottom.html" in "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/self.jsp?UserUrl=202.98.24.121" [MsgId: MMSG-26574]
Action.c(5): Found resource "http://pics.cache.cncmax.cn/images/upload/wwwroot/pictures/cncmax/cncmaximage/js/dnsv2.js" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/self.jsp?UserUrl=202.98.24.121" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://s107.cnzz.com/stat.php?id=1535648&web_id=1535648&show=pic1" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/self.jsp?UserUrl=202.98.24.121" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/img/icon_11.gif" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/left.html" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/img/icon_8.gif" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/left.html" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/img/icon_2.gif" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/left.html" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/img/icon_10.gif" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/left.html" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/img/icon_6.gif" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/left.html" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/img/icon_5.gif" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/left.html" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/img/icon_1.gif" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/left.html" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/img/icon_3.gif" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/left.html" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/img/icon_9.gif" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/left.html" [MsgId: MMSG-26659]
Action.c(5): Found resource "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/images/ad2.jpg" in HTML "http://jldns1.cncmax.cn:8080/issueunziped/baidujl090927n2/left.html" [MsgId: MMSG-26659]
Action.c(5): web_url("wpad.dat") was successful, 87365 body bytes, 6541 header bytes, 48 chunking overhead bytes [MsgId: MMSG-26385]
Action.c(14): Found resource "http://www.fjgsgg.com/css.css" in HTML "http://www.fjgsgg.com/zfbz.asp" [MsgId: MMSG-26659]
Action.c(14): Found resource "http://www.fjgsgg.com/main.files/bg_right300.gif" in HTML "http://www.fjgsgg.com/zfbz.asp" [MsgId: MMSG-26659]
Action.c(14): Warning -26627: HTTP Status-Code=404 (Not Found) for "http://www.fjgsgg.com/main.files/bg_right300.gif" [MsgId: MWAR-26627]
Action.c(14): web_url("zfbz.asp") highest severity level was "warning", 19176 body bytes, 656 header bytes [MsgId: MMSG-26388]
Action.c(25): Registering web_reg_save_param was successful [MsgId: MMSG-26390]
Action.c(26): Submitting form to "http://www.fjgsgg.com/zfbz.asp?zf=submit", Target Frame="" [MsgId: MMSG-27978]
Action.c(26): Resource "http://www.fjgsgg.com/css.css" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]
Action.c(26): Found resource "http://www.fjgsgg.com/main.files/bg_right300.gif" in HTML "http://www.fjgsgg.com/zfbz.asp?zf=submit" [MsgId: MMSG-26659]
Action.c(26): Warning -26627: HTTP Status-Code=404 (Not Found) for "http://www.fjgsgg.com/main.files/bg_right300.gif" [MsgId: MWAR-26627]
Action.c(26): web_submit_form("zfbz.asp_2") highest severity level was "warning", 12886 body bytes, 338 header bytes [MsgId: MMSG-26388]
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
运行结果是在D盘创建了一个1.txt,但里面并没有写入任何内容,请各位帮忙看看是什么问题,感谢! |
|