51Testing软件测试论坛

标题: 请教:关于脚本运行的问题! [打印本页]

作者: zoelily    时间: 2004-7-8 15:24
标题: 请教:关于脚本运行的问题!
我录制了一个产品添加功能,其中一项是添加图片,在运行的时候图片确没有添加上去,是什么原因?
录制的代码:
{   
           
    lr_start_transaction("insert_prod");
        web_submit_data("prod",
                "Action=http://mic-admin/phpapp_oracle/admin_add/add_prod.php3",
                "Method=POST",
                "EncType=multipart/form-data",
                "RecContentType=text/html",
                "Referer=http://mic-admin/phpapp_oracle/admin_add/add_prod.php3",
                "Snapshot=t4.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=language", "Value=EN", ENDITEM,
        "Name=user_id", "Value={comid}", ENDITEM,
                "Name=prod_name", "Value=prodname{Param}", ENDITEM,
                "Name=prod_id", "Value=", ENDITEM,
                "Name=hs_code_no", "Value=", ENDITEM,
                "Name=new_cat_id", "Value=117", ENDITEM,
                "Name=new_sub_cat_id", "Value=117030", ENDITEM,
                "Name=prod_trademark", "Value=", ENDITEM,
                "Name=prod_output", "Value=", ENDITEM,
                "Name=prod_price", "Value=", ENDITEM,
                "Name=prod_model", "Value=", ENDITEM,
                "Name=prod_standard", "Value=", ENDITEM,
                "Name=prod_custom", "Value=", ENDITEM,
                "Name=prod_descript", "Value=test  add  product", ENDITEM,
                "Name=prod_remark", "Value=", ENDITEM,
                "Name=prod_hidden_info", "Value=", ENDITEM,
                "Name=prod_photo", "Value=", ENDITEM,
     // "Name=prod_photo_id", "Value=", ENDITEM,
                //"Name=del_img", "Value=yes", ENDITEM,
                "Name=prod_keyword", "Value=proname", ENDITEM,
                "Name=prod_url", "Value=", ENDITEM,
                "Name=submit", "Value=加入此公司信息", ENDITEM,
                EXTRARES,
                "URL=/images2/top_line.gif", ENDITEM,
                "URL=/ads/viewbanner.php?bannerID=441", ENDITEM,
                LAST);
        lr_end_transaction("insert_prod", LR_AUTO);
   
        return 0;
运行日志:
Virtual User Script started
Starting action vuser_init.
Web Turbo Replay of LoadRunner 7.80.0 for WIN2000; Web build 2271          [MsgId: MMSG-27143]
Run-Time Settings file: "E:\测试脚本\script\prod_add_en\\default.cfg"          [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(6): web_add_cookie was successful          [MsgId: MMSG-27182]
Action.c(7): Detected non-resource "http://mic-admin/phpapp_oracle/admin/frm_left.php" in "http://mic-admin/phpapp_oracle/admin/"          [MsgId: MMSG-26574]
Action.c(7): Detected non-resource "http://mic-admin/phpapp_oracle/admin/frm_top.php" in "http://mic-admin/phpapp_oracle/admin/"          [MsgId: MMSG-26574]
Action.c(7): Detected non-resource "http://mic-admin/phpapp_oracle/admin/frm_body.php" in "http://mic-admin/phpapp_oracle/admin/"          [MsgId: MMSG-26574]
Action.c(7): Found resource "http://mic-admin/phpapp_oracle/admin/css/mic_link.css" in HTML "http://mic-admin/phpapp_oracle/admin/frm_left.php"          [MsgId: MMSG-26659]
Action.c(7): Found resource "http://mic-admin/phpapp_oracle/admin/js/make_tree.js" in HTML "http://mic-admin/phpapp_oracle/admin/frm_left.php"          [MsgId: MMSG-26659]
Action.c(7): web_url was successful, 85883 body bytes, 1598 header bytes          [MsgId: MMSG-27176]
Action.c(16): Detected non-resource "http://mic-admin/phpapp_oracle/admin/frm_left.php" in "http://mic-admin/phpapp_oracle/admin/index.php"          [MsgId: MMSG-26574]
Action.c(16): Detected non-resource "http://mic-admin/phpapp_oracle/admin/frm_top.php" in "http://mic-admin/phpapp_oracle/admin/index.php"          [MsgId: MMSG-26574]
Action.c(16): Detected non-resource "http://mic-admin/phpapp_oracle/admin/frm_body.php" in "http://mic-admin/phpapp_oracle/admin/index.php"          [MsgId: MMSG-26574]
Action.c(16): Resource "http://mic-admin/phpapp_oracle/admin/css/mic_link.css" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(16): Resource "http://mic-admin/phpapp_oracle/admin/js/make_tree.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(16): web_submit_data was successful, 77834 body bytes, 1038 header bytes          [MsgId: MMSG-27176]
Action.c(29): Linking to "http://mic-admin/phpapp_oracle/admin_add/add_prod.php3", Target Frame="body"          [MsgId: MMSG-27994]
Action.c(29): web_link was successful, 470 body bytes, 403 header bytes          [MsgId: MMSG-27176]
Action.c(34): Submitting form to "http://mic-admin/phpapp_oracle/admin_add/add_prod.php3", Target Frame=""          [MsgId: MMSG-27978]
Action.c(34): web_submit_form was successful, 48275 body bytes, 403 header bytes          [MsgId: MMSG-27176]
Ending action Action.
Starting action prod_add.
prod_add.c(4): Notify: Transaction insert_prod started.
prod_add.c(5): Downloading resource "http://mic-admin/images2/top_line.gif" (specified by argument number 71)          [MsgId: MMSG-26577]
prod_add.c(5): Downloading resource "http://mic-admin/ads/viewbanner.php?bannerID=441" (specified by argument number 73)          [MsgId: MMSG-26577]
prod_add.c(5): Warning -26627: HTTP Status-Code=404 (Not Found) for "http://mic-admin/ads/viewbanner.php?bannerID=441"          [MsgId: MWAR-26627]
prod_add.c(5): Warning -26627: HTTP Status-Code=404 (Not Found) for "http://mic-admin/images2/top_line.gif"          [MsgId: MWAR-26627]
prod_add.c(5): web_submit_data highest severity level was "warning", 48929 body bytes, 807 header bytes          [MsgId: MMSG-27178]
prod_add.c(40): Notify: Transaction insert_prod ended with Pass status (Duration: 0.7037).
Ending action prod_add.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.

[ Last edited by zoelily on 2004-7-8 at 15:57 ]
作者: pcl2004_27    时间: 2004-7-14 09:05
loadrunner录制的不是你的基本操作,它是一种消息操作。也就是不是录制你真实的操作动作,只是通过“消息“把这种行为告诉服务器,我要做什么。他不会管成功与否!所以很多时候会发现回放后,数据添加不成功,而操作返回是成功的。


  在你的调试信息中有这样的消息:
  prod_add.c(5): web_submit_data highest severity level was "warning", 48929 body bytes, 807 header bytes          [MsgId: MMSG-27178]
你察看一下ie设置和涉及权限的地方,是否有问题。
作者: Jon    时间: 2006-4-21 11:16
我也遇见过这样的问题,请斑竹或是知道解决方法的朋友们指点,谢谢了!!
/*
vuser_init.c(21): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "http://oatest/syntsbis/secure/Logon.aspx?FromUrl=%2fsyntsbis%2fdefault_Left.aspx"  
*/

/*
vuser_init.c(21): web_submit_data("Logon.aspx_3") highest severity level was "ERROR", 8014 body bytes, 264 header bytes          [MsgId: MMSG-26388]
*/




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