51Testing软件测试论坛

标题: 为什么添加检查点后,运行报错? [打印本页]

作者: hg00_11    时间: 2007-1-18 10:02
标题: 为什么添加检查点后,运行报错?
我的脚本是:
Action()
{

        web_set_max_html_param_len("1024");

        web_url("db",
                "URL=http://192.168.10.150/db",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                LAST);

/* Registering parameter(s) from source task id 6
        // {Siebel_Analytic_ViewState3} = "dDwtNjk4NzgyMzY2Ozs+oEZ9VL2AqHlheROvB25oUtk03Qk="
        // */

        web_reg_save_param("Siebel_Analytic_ViewState3",
                "LB/IC=ViewState\" value=\"",
                "RB/IC=\"",
                "Ord=1",
                "RelFrameId=1",
                "Search=Body",
                LAST);

        lr_think_time(4);

        web_url("main_Logon_frm.aspx",
                "URL=http://192.168.10.150/db/main_Logon_frm.aspx",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t2.inf",
                "Mode=HTML",
                EXTRARES,
                "URL=img/b1.jpg", ENDITEM,
                "URL=img/b2.jpg", ENDITEM,
                "URL=img/b5.jpg", ENDITEM,
                "URL=img/b3.jpg", ENDITEM,
                "URL=img/b4.jpg", ENDITEM,
                LAST);

        lr_rendezvous("login");

        lr_start_transaction("login");

        web_submit_data("main_Logon_frm.aspx_2",
                "Action=http://192.168.10.150/db/main_Logon_frm.aspx",
                "Method=POST",
                "TargetFrame=",
                "RecContentType=text/html",
                "Referer=http://192.168.10.150/db/main_Logon_frm.aspx",
                "Snapshot=t3.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState3}", ENDITEM,
                "Name=UserLogon:txtUserID", "Value=ep", ENDITEM,
                "Name=UserLogon:TextBox1", "Value=ep", ENDITEM,
                "Name=UserLogon:btnLogon", "Value=\xC8\xB7\xB6\xA8", ENDITEM,
                "Name=UserLogon:txtPwd", "Value=", ENDITEM,
                EXTRARES,
                "URL=img/ba.jpg", "Referer=http://192.168.10.150/db/main_frm.aspx", ENDITEM,
                "URL=img/bb.jpg", "Referer=http://192.168.10.150/db/main_frm.aspx", ENDITEM,
                "URL=img/bc.jpg", "Referer=http://192.168.10.150/db/main_frm.aspx", ENDITEM,
                "URL=img/bd.jpg", "Referer=http://192.168.10.150/db/main_frm.aspx", ENDITEM,
                "URL=img/be.jpg", "Referer=http://192.168.10.150/db/main_frm.aspx", ENDITEM,
                LAST);
        web_image_check("web_image_check","Src=img/be.jpg",LAST);
       

        lr_end_transaction("login", LR_AUTO);

        return 0;
}




运行的log是:

Virtual User Script started
Starting action vuser_init.
Web Turbo Replay of LoadRunner 8.0.0 for WINXP; Web build 4121          [MsgId: MMSG-27143]
Run-Time Settings file: "E:\LoadRunner\Script\login\\default.cfg"          [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(4): web_set_max_html_param_len was successful          [MsgId: MMSG-26392]
Action.c(6): Redirecting "http://192.168.10.150/db" (redirection depth=0)          [MsgId: MMSG-26694]
Action.c(6): To location "http://192.168.10.150/db/"          [MsgId: MMSG-26693]
Action.c(6): web_url("db") was successful, 940 body bytes, 423 header bytes          [MsgId: MMSG-26386]
Action.c(20): Registering web_reg_save_param was successful          [MsgId: MMSG-26390]
Action.c(30): Found resource "http://192.168.10.150/db/common/css/StyleBasic.css" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx"          [MsgId: MMSG-26659]
Action.c(30): Found resource "http://192.168.10.150/db/img/b1.jpg" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx"          [MsgId: MMSG-26659]
Action.c(30): Found resource "http://192.168.10.150/db/img/spacer.gif" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx"          [MsgId: MMSG-26659]
Action.c(30): Found resource "http://192.168.10.150/db/img/b2.jpg" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx"          [MsgId: MMSG-26659]
Action.c(30): Found resource "http://192.168.10.150/db/img/b5.jpg" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx"          [MsgId: MMSG-26659]
Action.c(30): Found resource "http://192.168.10.150/common/css/StyleBasic.css" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx"          [MsgId: MMSG-26659]
Action.c(30): Found resource "http://192.168.10.150/db/img/b3.jpg" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx"          [MsgId: MMSG-26659]
Action.c(30): Downloading resource "http://192.168.10.150/db/img/b4.jpg" (specified by argument number 18)          [MsgId: MMSG-26577]
Action.c(30): Warning -26627: HTTP Status-Code=404 (Object Not Found) for "http://192.168.10.150/common/css/StyleBasic.css"          [MsgId: MWAR-26627]
Action.c(30): web_url("main_Logon_frm.aspx") highest severity level was "warning", 133264 body bytes, 2128 header bytes          [MsgId: MMSG-26388]
Action.c(46): Rendezvous login
Action.c(48): Notify: Transaction "login" started.
Action.c(50): Redirecting "http://192.168.10.150/db/main_Logon_frm.aspx" (redirection depth=0)          [MsgId: MMSG-26694]
Action.c(50): To location "http://192.168.10.150/db/main_frm.aspx"          [MsgId: MMSG-26693]
Action.c(50): Resource "http://192.168.10.150/db/common/css/StyleBasic.css" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(50): Downloading resource "http://192.168.10.150/db/img/ba.jpg" (specified by argument number 26)          [MsgId: MMSG-26577]
Action.c(50): Downloading resource "http://192.168.10.150/db/img/bb.jpg" (specified by argument number 29)          [MsgId: MMSG-26577]
Action.c(50): Downloading resource "http://192.168.10.150/db/img/bc.jpg" (specified by argument number 32)          [MsgId: MMSG-26577]
Action.c(50): Downloading resource "http://192.168.10.150/db/img/bd.jpg" (specified by argument number 35)          [MsgId: MMSG-26577]
Action.c(50): Downloading resource "http://192.168.10.150/db/img/be.jpg" (specified by argument number 38)          [MsgId: MMSG-26577]
Action.c(50): Found resource "http://192.168.10.150/ig_common/20061/scripts/ig_shared.js" in HTML "http://192.168.10.150/db/main_frm.aspx"          [MsgId: MMSG-26659]
Action.c(50): Found resource "http://192.168.10.150/ig_common/20061/scripts/ig_weblistbar2_2.js" in HTML "http://192.168.10.150/db/main_frm.aspx"          [MsgId: MMSG-26659]
Action.c(50): Resource "http://192.168.10.150/db/img/spacer.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(50): Found resource "http://192.168.10.150/ig_common/images/WindowsClassic/trans.gif" in HTML "http://192.168.10.150/db/main_frm.aspx"          [MsgId: MMSG-26659]
Action.c(50): Found resource "http://192.168.10.150/ig_common/images/uparrows_white.gif" in HTML "http://192.168.10.150/db/main_frm.aspx"          [MsgId: MMSG-26659]
Action.c(50): Detected non-resource "http://192.168.10.150/db/common/blank.htm" in "http://192.168.10.150/db/main_frm.aspx"          [MsgId: MMSG-26574]
Action.c(50): Found resource "http://192.168.10.150/db/common/css/menuStyle.css" in HTML "http://192.168.10.150/db/common/blank.htm"          [MsgId: MMSG-26659]
Action.c(50): Found resource "http://192.168.10.150/db/common/css/treeStyle.css" in HTML "http://192.168.10.150/db/common/blank.htm"          [MsgId: MMSG-26659]
Action.c(50): Found resource "http://192.168.10.150/db/common/controls/img/normalbackline2.jpg" in HTML "http://192.168.10.150/db/common/blank.htm"          [MsgId: MMSG-26659]
Action.c(50): Warning -26627: HTTP Status-Code=404 (Object Not Found) for "http://192.168.10.150/db/common/controls/img/normalbackline2.jpg"          [MsgId: MWAR-26627]
Action.c(50): web_submit_data("main_Logon_frm.aspx_2") highest severity level was "warning", 111959 body bytes, 3762 header bytes          [MsgId: MMSG-26388]
Action.c(71): Error -27191: "web_image_check" failed (0 occurrence(s) found. Alt="", Src="img/be.jpg")          [MsgId: MERR-27191]
Action.c(71): web_image_check highest severity level was "ERROR"          [MsgId: MMSG-26391]
Action.c(71): Notify: Transaction "login" ended with "Fail" status (Duration: 0.6911).
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.


我在Recording Options里选的是HTML-base script ,HTML Advanced里选的是A script containing explicit URLs only。
去掉检查点后就运行成功
不知道为什么
哪位大虾指教一下?
作者: rokey    时间: 2007-1-18 10:05
我也出现过相同的问题,期待中
作者: jut984907    时间: 2007-1-18 10:15
web_image_check" failed (0 occurrence(s) found. Alt="", Src="img/be.jpg")          [MsgId: MERR-27191]
提示:没找到这个图片
作者: hg00_11    时间: 2007-1-18 12:53
但这个图片在脚本里有啊
"URL=img/be.jpg",
作者: jut984907    时间: 2007-1-18 14:42
src属性要根据<img src="/intl/zh-CN_ALL/images/logo.gif"设置的。
作者: hg00_11    时间: 2007-1-18 14:53
那是不是说我的脚本里没有图片啊?做不了检查点吗?我要做检查点的话该怎么设置啊?
作者: r_sunny    时间: 2007-1-18 15:49
/images/in_home.gif  应该是图片的相对路径写得不完全!检查一下
作者: SWeiNi    时间: 2007-3-19 13:34
标题: ...
会不会是因为运行中出错了呢??
作者: jackly    时间: 2007-3-19 16:51
标题: 录制的脚本的路经不对
该问题是因为录制的脚本中记录的图片的地址和实际地址是不对的,例如,这里是否少了程序的上下文根?

其实你可以拷贝图片地址去访问的,验证图片是否存在!
作者: lgwmlx    时间: 2007-3-19 21:34
我也碰到过这样的问题,期待解决中?
作者: daixx243    时间: 2007-3-20 10:20
标题: 设置图片检查点报错
最近我也在学习设置图片检查点,在测试的一个例子中,服务器返回的页面中包含了<img src="images/left1.gif" width="189" height="40">

我在测试脚本中设置了一个图片检查点:        web_image_check("web_image_check",
                                            "Src=images/left1.gif",
                                            LAST);
在运行结果中报了和 hg00_11一样的错误..
盼望有高手帮助解决,不胜感激!!!!!!!!
作者: zhangtao    时间: 2007-3-20 10:56
Action.c(30): Found resource "http://192.168.10.150/db/img/b5.jpg" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx"          [MsgId: MMSG-26659]

不能发现图片,在"Src=images/left1.gif"写上图片的完整地址试试~~~~~~
作者: daixx243    时间: 2007-3-20 11:05
标题: 设置检查点报错
我已经用完整的路径搜索过了,这张图片是可以通过完整的路径搜索到的.

奇怪的是我测试一个区号查询系统的时候,<img src="images/left1.gif" width="189" height="40">.
在测试脚本中设置图片检查点:        web_image_check("web_image_check",
                              "Src=images/newindex1_25.gif",
                              LAST);
却可以找的到,运行时不报错!!!晕中!!!!
作者: jacky8024    时间: 2007-3-20 14:56
图片路径设置的问题,你改一下就好了
作者: SWeiNi    时间: 2007-5-23 17:50
图片路径设置问题拉~~
作者: sandsor    时间: 2007-11-23 23:58
标题: 本人试验过,关于jpg的问题
在测试当中,

奇怪的是 同样的检查点,
而路径也是一样的, gif 图像格式可以检查通过
而jpg图像格式检查不通过,

难道,image check 不支持jpg检查??????

前提: 该路径经检验无问题,可以直接在网页中显示图片

请教各位,急急急!!!!!!!!!!!!!!!!!!!111
作者: blueeagle9999    时间: 2008-7-9 09:57
我也碰到了同样的问题,奇怪的是在另外一个页面中的同样类型的GIF图象是可以成功运行的。。。不解 ~~




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2