51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 7698|回复: 4
打印 上一主题 下一主题

[求助] 脚本回放的时候Waring:HTTP Status-Code=404 (Not Found)

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2009-10-28 10:13:50 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我所测试的网站:http://www.fjgsgg.com/zfbz.asp(这其实是网站http://www.fjgsgg.com的一个版块,别的版块我不需要,所以就只测试这个版块)
我录制的代码:
  1. Action()
  2. {
  3.     char leon[50];
  4.         long file;
  5.         web_url("wpad.dat",
  6.                 "URL=http://202.98.24.121/wpad.dat",
  7.                 "Resource=0",
  8.                 "RecContentType=text/html",
  9.                 "Referer=",
  10.                 "Snapshot=t1.inf",
  11.                 "Mode=HTML",
  12.                 LAST);

  13.         web_url("zfbz.asp",
  14.                 "URL=http://www.fjgsgg.com/zfbz.asp",
  15.                 "Resource=0",
  16.                 "RecContentType=text/html",
  17.                 "Referer=",
  18.                 "Snapshot=t2.inf",
  19.                 "Mode=HTML",
  20.                 LAST);

  21.         lr_think_time(8);

  22.         web_reg_save_param("leon","LB=距离为","RB=公里",LAST);
  23.         web_submit_form("zfbz.asp_2",
  24.                 "Snapshot=t3.inf",
  25.                 ITEMDATA,
  26.                 "Name=names1", "Value=闽浙省际", ENDITEM,
  27.                 "Name=names2", "Value=福鼎", ENDITEM,
  28.                 "Name=B1", "Value=查询", ENDITEM,
  29.                 LAST);
  30.     file=fopen("d://1.txt","at+");
  31.         fputs(leon,file);
  32.     fclose(file);
  33.         return 0;
  34. }
复制代码
其中: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,但里面并没有写入任何内容,请各位帮忙看看是什么问题,感谢!
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2009-10-28 19:53:11 | 只看该作者
用IE打开

直接报错,楼主检查下
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2009-10-28 19:53:39 | 只看该作者
用IE 打开

直接报错,楼主检查下
回复 支持 反对

使用道具 举报

  • TA的每日心情
    开心
    2016-2-22 11:07
  • 签到天数: 2 天

    连续签到: 1 天

    [LV.1]测试小兵

    4#
    发表于 2013-5-7 14:17:45 | 只看该作者
    LZ你请问你解决了吗?我也遇到了类似的问题!
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    5#
    发表于 2013-5-7 16:03:33 | 只看该作者
    这个楼主对web_reg_save_param函数理解错误了……按这个脚本写入文件中的肯定是空……
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-11-7 22:49 , Processed in 0.072803 second(s), 27 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表