hg00_11 发表于 2007-1-18 10:02:34

为什么添加检查点后,运行报错?

我的脚本是:
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       
Run-Time Settings file: "E:\LoadRunner\Script\login\\default.cfg"       
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(4): web_set_max_html_param_len was successful       
Action.c(6): Redirecting "http://192.168.10.150/db" (redirection depth=0)       
Action.c(6): To location "http://192.168.10.150/db/"       
Action.c(6): web_url("db") was successful, 940 body bytes, 423 header bytes       
Action.c(20): Registering web_reg_save_param was successful       
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"       
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"       
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"       
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"       
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"       
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"       
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"       
Action.c(30): Downloading resource "http://192.168.10.150/db/img/b4.jpg" (specified by argument number 18)       
Action.c(30): Warning -26627: HTTP Status-Code=404 (Object Not Found) for "http://192.168.10.150/common/css/StyleBasic.css"       
Action.c(30): web_url("main_Logon_frm.aspx") highest severity level was "warning", 133264 body bytes, 2128 header bytes       
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)       
Action.c(50): To location "http://192.168.10.150/db/main_frm.aspx"       
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       
Action.c(50): Downloading resource "http://192.168.10.150/db/img/ba.jpg" (specified by argument number 26)       
Action.c(50): Downloading resource "http://192.168.10.150/db/img/bb.jpg" (specified by argument number 29)       
Action.c(50): Downloading resource "http://192.168.10.150/db/img/bc.jpg" (specified by argument number 32)       
Action.c(50): Downloading resource "http://192.168.10.150/db/img/bd.jpg" (specified by argument number 35)       
Action.c(50): Downloading resource "http://192.168.10.150/db/img/be.jpg" (specified by argument number 38)       
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"       
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"       
Action.c(50): Resource "http://192.168.10.150/db/img/spacer.gif" is in the cache already and will not be downloaded again       
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"       
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"       
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"       
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"       
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"       
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"       
Action.c(50): Warning -26627: HTTP Status-Code=404 (Object Not Found) for "http://192.168.10.150/db/common/controls/img/normalbackline2.jpg"       
Action.c(50): web_submit_data("main_Logon_frm.aspx_2") highest severity level was "warning", 111959 body bytes, 3762 header bytes       
Action.c(71): Error -27191: "web_image_check" failed (0 occurrence(s) found. Alt="", Src="img/be.jpg")       
Action.c(71): web_image_check highest severity level was "ERROR"       
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:52

我也出现过相同的问题,期待中

jut984907 发表于 2007-1-18 10:15:19

web_image_check" failed (0 occurrence(s) found. Alt="", Src="img/be.jpg")         
提示:没找到这个图片

hg00_11 发表于 2007-1-18 12:53:38

但这个图片在脚本里有啊
"URL=img/be.jpg",

jut984907 发表于 2007-1-18 14:42:17

src属性要根据<img src="/intl/zh-CN_ALL/images/logo.gif"设置的。

hg00_11 发表于 2007-1-18 14:53:38

那是不是说我的脚本里没有图片啊?做不了检查点吗?我要做检查点的话该怎么设置啊?

r_sunny 发表于 2007-1-18 15:49:36

/images/in_home.gif应该是图片的相对路径写得不完全!检查一下

SWeiNi 发表于 2007-3-19 13:34:30

...

会不会是因为运行中出错了呢??

jackly 发表于 2007-3-19 16:51:15

录制的脚本的路经不对

该问题是因为录制的脚本中记录的图片的地址和实际地址是不对的,例如,这里是否少了程序的上下文根?

其实你可以拷贝图片地址去访问的,验证图片是否存在!

lgwmlx 发表于 2007-3-19 21:34:06

我也碰到过这样的问题,期待解决中?

daixx243 发表于 2007-3-20 10:20:49

设置图片检查点报错

最近我也在学习设置图片检查点,在测试的一个例子中,服务器返回的页面中包含了<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:53

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"         

不能发现图片,在"Src=images/left1.gif"写上图片的完整地址试试~~~~~~

daixx243 发表于 2007-3-20 11:05:45

设置检查点报错

我已经用完整的路径搜索过了,这张图片是可以通过完整的路径搜索到的.http://192.168.2.32:8182/qxt/pages/images/left1.gif

奇怪的是我测试一个区号查询系统的时候,<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:35

图片路径设置的问题,你改一下就好了

SWeiNi 发表于 2007-5-23 17:50:45

图片路径设置问题拉~~

sandsor 发表于 2007-11-23 23:58:02

本人试验过,关于jpg的问题

在测试当中,

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

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

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

请教各位,急急急!!!!!!!!!!!!!!!!!!!111

blueeagle9999 发表于 2008-7-9 09:57:41

我也碰到了同样的问题,奇怪的是在另外一个页面中的同样类型的GIF图象是可以成功运行的。。。不解:L ~~
页: [1]
查看完整版本: 为什么添加检查点后,运行报错?