xin978xin 发表于 2011-4-12 11:21:23

LR负载压力测试2个用户时而都通过,时而只通过一个?急急急

我在做负载压力测试时,负载2个用户时,有时候都会通过,有时候只通过一个,这个到底是怎么一回事
错误提示都是-26612 http500 错误
但是我觉得系统不可能2个用户负载都承受不了!

archonwang 发表于 2011-4-12 13:34:30

??

这个。拿脚本和场景定义说话。

xin978xin 发表于 2011-4-12 14:10:37

/* -------------------------------------------------------------------------------
        Script Title       :
        Script Description :
                        
                        
        Recorder Version   : 1196
   ------------------------------------------------------------------------------- */

vuser_init()
{

        web_url("adm_login.asp",
                "URL=http://192.168.150.18:2010/adm_login.asp?",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                LAST);

        lr_think_time(4);

        web_submit_data("adm_login.asp_2",
                "Action=http://192.168.150.18:2010/adm_login.asp?",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/adm_login.asp?",
                "Snapshot=t2.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=clo", "Value=", ENDITEM,
                "Name=userID", "Value={NewParam}", ENDITEM,
                "Name=pwd", "Value={NewParam_1}", ENDITEM,
                "Name=sDSN", "Value=ERPLive_MF", ENDITEM,
                "Name=SubmitAction", "Value=Login", ENDITEM,
                LAST);

        web_url("index.asp",
                "URL=http://192.168.150.18:2010/index.asp",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t3.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/images/main/tableToptitleBg.jpg", "Referer=http://192.168.150.18:2010/admin/afterlogin.asp", ENDITEM,
                "Url=/images/main/subMenuBg.jpg", "Referer=http://192.168.150.18:2010/admin/eitLeft.asp", ENDITEM,
                "Url=/images/gb/tree_folder1_0.gif", "Referer=http://192.168.150.18:2010/admin/eitLeft.asp", ENDITEM,
                "Url=/images/main/main_menu_on.jpg", "Referer=http://192.168.150.18:2010/admin/eitLeft.asp", ENDITEM,
                "Url=/images/gb/tree_folder3.gif", "Referer=http://192.168.150.18:2010/admin/eitLeft.asp", ENDITEM,
                "Url=/images/gb/leftLoading.gif", "Referer=http://192.168.150.18:2010/admin/eitLeft.asp", ENDITEM,
                LAST);

        web_url("adm_Gui_edit.asp",
                "URL=http://192.168.150.18:2010/admin/adm_Gui_edit.asp?pModule_=inv",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/index.asp",
                "Snapshot=t4.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/gb/flow_bg.gif", "Referer=http://192.168.150.18:2010/admin/adm_Gui_design_edit.asp?pModule_=inv", ENDITEM,
                LAST);

        web_custom_request("adm_Gui_edit_ajax.asp",
                "URL=http://192.168.150.18:2010/admin/adm_Gui_edit_ajax.asp?pfunc_id=inv_pm_viewinv_pmassign_viewinv_sa_viewinv_rm_viewinv_ei_viewinv_shipment_viewinv_eo_viewinv_pc_viewbom_partcode_viewinv_manuc_viewinv_unit_viewbom_unitchange_viewinv_partplan_viewinv_partinfo_viewinv_stopart_viewinv_phy_rptinv_txninv_otherinv_stockqtyd_rptinv_stockqtyT_rptinv_phy_list",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/admin/adm_Gui_design_edit.asp?pModule_=inv",
                "Snapshot=t5.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        web_url("inv_elsein_list.asp",
                "URL=http://192.168.150.18:2010/inventory/inv_elsein_list.asp",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/admin/eitLeft.asp",
                "Snapshot=t6.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/gb/prev_icon.gif", ENDITEM,
                "Url=../images/main/tableToptitleBg.jpg", ENDITEM,
                "Url=../images/main/line.jpg", ENDITEM,
                LAST);

        return 0;
}

xin978xin 发表于 2011-4-12 14:11:26

Action()
{

        lr_think_time(5);

        web_url("mouseOverBg.jpg",
                "URL=http://192.168.150.18:2010/images/main/mouseOverBg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp",
                "Snapshot=t7.inf",
                LAST);

        web_url("mainBottomBg.jpg",
                "URL=http://192.168.150.18:2010/images/main/mainBottomBg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp",
                "Snapshot=t8.inf",
                LAST);

        web_add_cookie("keyvalue=1; DOMAIN=192.168.150.18");

        web_url("inv_elsein_edit.asp",
                "URL=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t9.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/gb/prev_icon.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/gb/next_icon.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/grid-loading.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/tableToptitleBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                LAST);

        web_url("{NewParam}INV_ELSEIN_EDIT_config.xml",
                "URL=http://192.168.150.18:2010/tempXML/{NewParam}INV_ELSEIN_EDIT_config.xml",
                "Resource=0",
                "RecContentType=text/xml",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Snapshot=t10.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main/mgSpliter1st.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgSpliter.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                LAST);

        web_url("{NewParam}INV_ELSEIN_EDIT_data.xml",
                "URL=http://192.168.150.18:2010/tempXML/{NewParam}INV_ELSEIN_EDIT_data.xml",
                "Resource=0",
                "RecContentType=text/xml",
                "Referer=http://192.168.150.18:2010/inventory/",
                "Snapshot=t11.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main/mgKSList.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgKSCell.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgEdit.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/gb/loading_16x16.gif", "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152", ENDITEM,
                LAST);

        web_url("myGrid_Content.asp",
                "URL=http://192.168.150.18:2010/common/myGrid_Content.asp?ExclusiveID=1010706&KeyWord=*",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152",
                "Snapshot=t12.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/gb/loading_16x16.gif", "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152", ENDITEM,
                LAST);

        web_url("myGrid_Content.asp_2",
                "URL=http://192.168.150.18:2010/common/myGrid_Content.asp?ExclusiveID=7356313&KeyWord=%u6210%u54C1%u4ED3&JV_7356313_9558941=00001",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152",
                "Snapshot=t13.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main/mouseOverBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mainBottomBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                LAST);



        //lr_rendezvous("point");

        lr_start_transaction("add");

        web_custom_request("myGrid_Save.asp",
                "URL=http://192.168.150.18:2010/common/myGrid_Save.asp?xmlName=/tempXML/{NewParam}INV_ELSEIN_EDIT_save.xml",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Mode=HTML",
                "EncType=text/xml; charset=UTF-8",
                "BodyBinary=<?xml version=\"1.0\"?>\r\n<data><r index=\"1\"><f1>00001</f1><f2>test</f2><f3>KG</f3><f4>鎴愬搧浠\\x93</f4><f5>10.0</f5><f6>0.0</f6><f7>0.00000000</f7><f8>0.0000</f8><f9>0.00000000</f9><f10></f10><f11>0.00</f11><f12>0.00</f12><f13>-5,716,212.96</f13><f14>1,083.00</f14><f15>39,717.00</f15><f16>0.00</f16><f17>5757012.96</f17><f18>0.00</f18></r><r index=\"1\"><f1></f1><f2></f2><f3></f3><f4></f4><f5></f5><f6></f6><f7></f7><f8></f8><f9></f9><f10></f10><f11></f11><f12></f12><f13></f13><f14><"
                "/f14><f15></f15><f16></f16><f17></f17><f18></f18></r></data>\r\n",
                LAST);

        web_submit_data("inv_elsein_edit_save.asp",
                "Action=http://192.168.150.18:2010/inventory/inv_elsein_edit_save.asp",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Snapshot=t14.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=SubmitAction", "Value=Add", ENDITEM,
                "Name=hidAction", "Value=", ENDITEM,
                "Name=pID_", "Value=", ENDITEM,
                "Name=COMPANYCODE", "Value=C01", ENDITEM,
                "Name=BILL_TYPE", "Value=I_1", ENDITEM,
                "Name=DEPARTMENT", "Value=", ENDITEM,
                "Name=ID_", "Value=", ENDITEM,
                "Name=Codeing_Name", "Value=其它入库单", ENDITEM,
                "Name=EI_NO", "Value=", ENDITEM,
                "Name=EI_DATE", "Value=2011-4-12", ENDITEM,
                "Name=EI_SHIP_DATE", "Value=2011-4-12", ENDITEM,
                "Name=CURRENCYCODE", "Value=RMB", ENDITEM,
                "Name=EXCHANGERATE", "Value=1.00000000", ENDITEM,
                "Name=VENDORNAME", "Value=", ENDITEM,
                "Name=VENDORNUMBER", "Value=", ENDITEM,
                "Name=ADDRESSCODE", "Value=", ENDITEM,
                "Name=ADDRESSNAME", "Value=", ENDITEM,
                "Name=EI_define_1", "Value=", ENDITEM,
                "Name=EI_define_2", "Value=", ENDITEM,
                "Name=EI_define_3", "Value=", ENDITEM,
                "Name=sumAMOUNT", "Value=0.00", ENDITEM,
                "Name=REMARKS", "Value=", ENDITEM,
                EXTRARES,
                "Url=../images/main/mouseOverBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp", ENDITEM,
                LAST);


        lr_end_transaction("add", LR_AUTO);

        return 0;
}

xin978xin 发表于 2011-4-12 14:11:48

vuser_end()
{

        web_url("mouseOverBg.jpg_2",
                "URL=http://192.168.150.18:2010/images/main/mouseOverBg.jpg",
                "Resource=1",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp",
                LAST);

        web_url("mouseOverBg.jpg_3",
                "URL=http://192.168.150.18:2010/images/main/mouseOverBg.jpg",
                "Resource=1",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp",
                LAST);

        web_url("mouseOverBg.jpg_4",
                "URL=http://192.168.150.18:2010/images/main/mouseOverBg.jpg",
                "Resource=1",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp",
                LAST);

        web_url("adm_logoff.asp",
                "URL=http://192.168.150.18:2010/adm_logoff.asp?Module=0",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t15.inf",
                "Mode=HTML",
                LAST);

        return 0;
}

xin978xin 发表于 2011-4-12 14:14:18

Action()
{

        lr_think_time(5);

        web_url("mouseOverBg.jpg",
                "URL=http://192.168.150.18:2010/images/main/mouseOverBg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp",
                "Snapshot=t7.inf",
                LAST);

        web_url("mainBottomBg.jpg",
                "URL=http://192.168.150.18:2010/images/main/mainBottomBg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp",
                "Snapshot=t8.inf",
                LAST);

        web_add_cookie("keyvalue=1; DOMAIN=192.168.150.18");

        web_url("inv_elsein_edit.asp",
                "URL=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t9.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/gb/prev_icon.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/gb/next_icon.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/grid-loading.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/tableToptitleBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                LAST);

        web_url("{NewParam}INV_ELSEIN_EDIT_config.xml",
                "URL=http://192.168.150.18:2010/tempXML/{NewParam}INV_ELSEIN_EDIT_config.xml",
                "Resource=0",
                "RecContentType=text/xml",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Snapshot=t10.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main/mgSpliter1st.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgSpliter.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                LAST);

        web_url("{NewParam}INV_ELSEIN_EDIT_data.xml",
                "URL=http://192.168.150.18:2010/tempXML/{NewParam}INV_ELSEIN_EDIT_data.xml",
                "Resource=0",
                "RecContentType=text/xml",
                "Referer=http://192.168.150.18:2010/inventory/",
                "Snapshot=t11.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main/mgKSList.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgKSCell.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgEdit.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/gb/loading_16x16.gif", "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152", ENDITEM,
                LAST);

        web_url("myGrid_Content.asp",
                "URL=http://192.168.150.18:2010/common/myGrid_Content.asp?ExclusiveID=1010706&KeyWord=*",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152",
                "Snapshot=t12.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/gb/loading_16x16.gif", "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152", ENDITEM,
                LAST);

        web_url("myGrid_Content.asp_2",
                "URL=http://192.168.150.18:2010/common/myGrid_Content.asp?ExclusiveID=7356313&KeyWord=%u6210%u54C1%u4ED3&JV_7356313_9558941=00001",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152",
                "Snapshot=t13.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main/mouseOverBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mainBottomBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                LAST);



        //lr_rendezvous("point");

        lr_start_transaction("add");

        web_custom_request("myGrid_Save.asp",
                "URL=http://192.168.150.18:2010/common/myGrid_Save.asp?xmlName=/tempXML/{NewParam}INV_ELSEIN_EDIT_save.xml",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Mode=HTML",
                "EncType=text/xml; charset=UTF-8",
                "BodyBinary=<?xml version=\"1.0\"?>\r\n<data><r index=\"1\"><f1>00001</f1><f2>test</f2><f3>KG</f3><f4>鎴愬搧浠\\x93</f4><f5>10.0</f5><f6>0.0</f6><f7>0.00000000</f7><f8>0.0000</f8><f9>0.00000000</f9><f10></f10><f11>0.00</f11><f12>0.00</f12><f13>-5,716,212.96</f13><f14>1,083.00</f14><f15>39,717.00</f15><f16>0.00</f16><f17>5757012.96</f17><f18>0.00</f18></r><r index=\"1\"><f1></f1><f2></f2><f3></f3><f4></f4><f5></f5><f6></f6><f7></f7><f8></f8><f9></f9><f10></f10><f11></f11><f12></f12><f13></f13><f14><"
                "/f14><f15></f15><f16></f16><f17></f17><f18></f18></r></data>\r\n",
                LAST);

        web_submit_data("inv_elsein_edit_save.asp",
                "Action=http://192.168.150.18:2010/inventory/inv_elsein_edit_save.asp",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Snapshot=t14.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=SubmitAction", "Value=Add", ENDITEM,
                "Name=hidAction", "Value=", ENDITEM,
                "Name=pID_", "Value=", ENDITEM,
                "Name=COMPANYCODE", "Value=C01", ENDITEM,
                "Name=BILL_TYPE", "Value=I_1", ENDITEM,
                "Name=DEPARTMENT", "Value=", ENDITEM,
                "Name=ID_", "Value=", ENDITEM,
                "Name=Codeing_Name", "Value=其它入库单", ENDITEM,
                "Name=EI_NO", "Value=", ENDITEM,
                "Name=EI_DATE", "Value=2011-4-12", ENDITEM,
                "Name=EI_SHIP_DATE", "Value=2011-4-12", ENDITEM,
                "Name=CURRENCYCODE", "Value=RMB", ENDITEM,
                "Name=EXCHANGERATE", "Value=1.00000000", ENDITEM,
                "Name=VENDORNAME", "Value=", ENDITEM,
                "Name=VENDORNUMBER", "Value=", ENDITEM,
                "Name=ADDRESSCODE", "Value=", ENDITEM,
                "Name=ADDRESSNAME", "Value=", ENDITEM,
                "Name=EI_define_1", "Value=", ENDITEM,
                "Name=EI_define_2", "Value=", ENDITEM,
                "Name=EI_define_3", "Value=", ENDITEM,
                "Name=sumAMOUNT", "Value=0.00", ENDITEM,
                "Name=REMARKS", "Value=", ENDITEM,
                EXTRARES,
                "Url=../images/main/mouseOverBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp", ENDITEM,
                LAST);


        lr_end_transaction("add", LR_AUTO);

        return 0;
}

xin978xin 发表于 2011-4-12 14:15:28

Action()
{

        lr_think_time(5);

        web_url("mouseOverBg.jpg",
                "URL=http://192.168.150.18:2010/images/main/mouseOverBg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp",
                "Snapshot=t7.inf",
                LAST);

        web_url("mainBottomBg.jpg",
                "URL=http://192.168.150.18:2010/images/main/mainBottomBg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp",
                "Snapshot=t8.inf",
                LAST);

        web_add_cookie("keyvalue=1; DOMAIN=192.168.150.18");

        web_url("inv_elsein_edit.asp",
                "URL=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t9.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/gb/prev_icon.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/gb/next_icon.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/grid-loading.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/tableToptitleBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                LAST);

        web_url("{NewParam}INV_ELSEIN_EDIT_config.xml",
                "URL=http://192.168.150.18:2010/tempXML/{NewParam}INV_ELSEIN_EDIT_config.xml",
                "Resource=0",
                "RecContentType=text/xml",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Snapshot=t10.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main/mgSpliter1st.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgSpliter.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                LAST);

        web_url("{NewParam}INV_ELSEIN_EDIT_data.xml",
                "URL=http://192.168.150.18:2010/tempXML/{NewParam}INV_ELSEIN_EDIT_data.xml",
                "Resource=0",
                "RecContentType=text/xml",
                "Referer=http://192.168.150.18:2010/inventory/",
                "Snapshot=t11.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main/mgKSList.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgKSCell.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgEdit.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/gb/loading_16x16.gif", "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152", ENDITEM,
                LAST);

xin978xin 发表于 2011-4-12 14:17:02

? 发不了?

xin978xin 发表于 2011-4-12 14:17:15

Action()
{

        lr_think_time(5);

        web_url("mouseOverBg.jpg",
                "URL=http://192.168.150.18:2010/images/main/mouseOverBg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp",
                "Snapshot=t7.inf",
                LAST);

        web_url("mainBottomBg.jpg",
                "URL=http://192.168.150.18:2010/images/main/mainBottomBg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp",
                "Snapshot=t8.inf",
                LAST);

        web_add_cookie("keyvalue=1; DOMAIN=192.168.150.18");

        web_url("inv_elsein_edit.asp",
                "URL=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t9.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/gb/prev_icon.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/gb/next_icon.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/grid-loading.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/tableToptitleBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                LAST);

        web_url("{NewParam}INV_ELSEIN_EDIT_config.xml",
                "URL=http://192.168.150.18:2010/tempXML/{NewParam}INV_ELSEIN_EDIT_config.xml",
                "Resource=0",
                "RecContentType=text/xml",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Snapshot=t10.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main/mgSpliter1st.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgSpliter.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                LAST);

        web_url("{NewParam}INV_ELSEIN_EDIT_data.xml",
                "URL=http://192.168.150.18:2010/tempXML/{NewParam}INV_ELSEIN_EDIT_data.xml",
                "Resource=0",
                "RecContentType=text/xml",
                "Referer=http://192.168.150.18:2010/inventory/",
                "Snapshot=t11.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main/mgKSList.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgKSCell.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgEdit.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/gb/loading_16x16.gif", "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152", ENDITEM,
                LAST);

        web_url("myGrid_Content.asp",
                "URL=http://192.168.150.18:2010/common/myGrid_Content.asp?ExclusiveID=1010706&KeyWord=*",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152",
                "Snapshot=t12.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/gb/loading_16x16.gif", "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152", ENDITEM,
                LAST);

        web_url("myGrid_Content.asp_2",
                "URL=http://192.168.150.18:2010/common/myGrid_Content.asp?ExclusiveID=7356313&KeyWord=%u6210%u54C1%u4ED3&JV_7356313_9558941=00001",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152",
                "Snapshot=t13.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main/mouseOverBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mainBottomBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                LAST);



        //lr_rendezvous("point");

        lr_start_transaction("add");

        web_custom_request("myGrid_Save.asp",
                "URL=http://192.168.150.18:2010/common/myGrid_Save.asp?xmlName=/tempXML/{NewParam}INV_ELSEIN_EDIT_save.xml",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Mode=HTML",
                "EncType=text/xml; charset=UTF-8",
                "BodyBinary=<?xml version=\"1.0\"?>\r\n<data><r index=\"1\"><f1>00001</f1><f2>test</f2><f3>KG</f3><f4>鎴愬搧浠\\x93</f4><f5>10.0</f5><f6>0.0</f6><f7>0.00000000</f7><f8>0.0000</f8><f9>0.00000000</f9><f10></f10><f11>0.00</f11><f12>0.00</f12><f13>-5,716,212.96</f13><f14>1,083.00</f14><f15>39,717.00</f15><f16>0.00</f16><f17>5757012.96</f17><f18>0.00</f18></r><r index=\"1\"><f1></f1><f2></f2><f3></f3><f4></f4><f5></f5><f6></f6><f7></f7><f8></f8><f9></f9><f10></f10><f11></f11><f12></f12><f13></f13><f14><"
                "/f14><f15></f15><f16></f16><f17></f17><f18></f18></r></data>\r\n",
                LAST);

        web_submit_data("inv_elsein_edit_save.asp",
                "Action=http://192.168.150.18:2010/inventory/inv_elsein_edit_save.asp",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Snapshot=t14.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=SubmitAction", "Value=Add", ENDITEM,
                "Name=hidAction", "Value=", ENDITEM,
                "Name=pID_", "Value=", ENDITEM,
                "Name=COMPANYCODE", "Value=C01", ENDITEM,
                "Name=BILL_TYPE", "Value=I_1", ENDITEM,
                "Name=DEPARTMENT", "Value=", ENDITEM,
                "Name=ID_", "Value=", ENDITEM,
                "Name=Codeing_Name", "Value=其它入库单", ENDITEM,
                "Name=EI_NO", "Value=", ENDITEM,
                "Name=EI_DATE", "Value=2011-4-12", ENDITEM,
                "Name=EI_SHIP_DATE", "Value=2011-4-12", ENDITEM,
                "Name=CURRENCYCODE", "Value=RMB", ENDITEM,
                "Name=EXCHANGERATE", "Value=1.00000000", ENDITEM,
                "Name=VENDORNAME", "Value=", ENDITEM,
                "Name=VENDORNUMBER", "Value=", ENDITEM,
                "Name=ADDRESSCODE", "Value=", ENDITEM,
                "Name=ADDRESSNAME", "Value=", ENDITEM,
                "Name=EI_define_1", "Value=", ENDITEM,
                "Name=EI_define_2", "Value=", ENDITEM,
                "Name=EI_define_3", "Value=", ENDITEM,
                "Name=sumAMOUNT", "Value=0.00", ENDITEM,
                "Name=REMARKS", "Value=", ENDITEM,
                EXTRARES,
                "Url=../images/main/mouseOverBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp", ENDITEM,
                LAST);


        lr_end_transaction("add", LR_AUTO);

        return 0;
}

xin978xin 发表于 2011-4-12 14:18:37

Action()
{

        lr_think_time(5);

        web_url("mouseOverBg.jpg",
                "URL=http://192.168.150.18:2010/images/main/mouseOverBg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp",
                "Snapshot=t7.inf",
                LAST);

        web_url("mainBottomBg.jpg",
                "URL=http://192.168.150.18:2010/images/main/mainBottomBg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp",
                "Snapshot=t8.inf",
                LAST);

        web_add_cookie("keyvalue=1; DOMAIN=192.168.150.18");

        web_url("inv_elsein_edit.asp",
                "URL=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t9.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/gb/prev_icon.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/gb/next_icon.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/grid-loading.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/tableToptitleBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                LAST);

        web_url("{NewParam}INV_ELSEIN_EDIT_config.xml",
                "URL=http://192.168.150.18:2010/tempXML/{NewParam}INV_ELSEIN_EDIT_config.xml",
                "Resource=0",
                "RecContentType=text/xml",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Snapshot=t10.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main/mgSpliter1st.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgSpliter.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                LAST);

        web_url("{NewParam}INV_ELSEIN_EDIT_data.xml",
                "URL=http://192.168.150.18:2010/tempXML/{NewParam}INV_ELSEIN_EDIT_data.xml",
                "Resource=0",
                "RecContentType=text/xml",
                "Referer=http://192.168.150.18:2010/inventory/",
                "Snapshot=t11.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main/mgKSList.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgKSCell.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mgEdit.gif", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/gb/loading_16x16.gif", "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152", ENDITEM,
                LAST);

        web_url("myGrid_Content.asp",
                "URL=http://192.168.150.18:2010/common/myGrid_Content.asp?ExclusiveID=1010706&KeyWord=*",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152",
                "Snapshot=t12.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/gb/loading_16x16.gif", "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152", ENDITEM,
                LAST);

        web_url("myGrid_Content.asp_2",
                "URL=http://192.168.150.18:2010/common/myGrid_Content.asp?ExclusiveID=7356313&KeyWord=%u6210%u54C1%u4ED3&JV_7356313_9558941=00001",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/common/myGrid_List.asp?ExclusiveID=&ListHeight=152",
                "Snapshot=t13.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main/mouseOverBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                "Url=../images/main/mainBottomBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add", ENDITEM,
                LAST);



        //lr_rendezvous("point");

        lr_start_transaction("add");

        web_custom_request("myGrid_Save.asp",
                "URL=http://192.168.150.18:2010/common/myGrid_Save.asp?xmlName=/tempXML/{NewParam}INV_ELSEIN_EDIT_save.xml",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Mode=HTML",
                "EncType=text/xml; charset=UTF-8",
                "BodyBinary=<?xml version=\"1.0\"?>\r\n<data><r index=\"1\"><f1>00001</f1><f2>test</f2><f3>KG</f3><f4>鎴愬搧浠\\x93</f4><f5>10.0</f5><f6>0.0</f6><f7>0.00000000</f7><f8>0.0000</f8><f9>0.00000000</f9><f10></f10><f11>0.00</f11><f12>0.00</f12><f13>-5,716,212.96</f13><f14>1,083.00</f14><f15>39,717.00</f15><f16>0.00</f16><f17>5757012.96</f17><f18>0.00</f18></r><r index=\"1\"><f1></f1><f2></f2><f3></f3><f4></f4><f5></f5><f6></f6><f7></f7><f8></f8><f9></f9><f10></f10><f11></f11><f12></f12><f13></f13><f14><"
                "/f14><f15></f15><f16></f16><f17></f17><f18></f18></r></data>\r\n",
                LAST);

        web_submit_data("inv_elsein_edit_save.asp",
                "Action=http://192.168.150.18:2010/inventory/inv_elsein_edit_save.asp",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.168.150.18:2010/inventory/inv_elsein_edit.asp?hidAction=Add",
                "Snapshot=t14.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=SubmitAction", "Value=Add", ENDITEM,
                "Name=hidAction", "Value=", ENDITEM,
                "Name=pID_", "Value=", ENDITEM,
                "Name=COMPANYCODE", "Value=C01", ENDITEM,
                "Name=BILL_TYPE", "Value=I_1", ENDITEM,
                "Name=DEPARTMENT", "Value=", ENDITEM,
                "Name=ID_", "Value=", ENDITEM,
                "Name=Codeing_Name", "Value=其它入库单", ENDITEM,
                "Name=EI_NO", "Value=", ENDITEM,
                "Name=EI_DATE", "Value=2011-4-12", ENDITEM,
                "Name=EI_SHIP_DATE", "Value=2011-4-12", ENDITEM,
                "Name=CURRENCYCODE", "Value=RMB", ENDITEM,
                "Name=EXCHANGERATE", "Value=1.00000000", ENDITEM,
                "Name=VENDORNAME", "Value=", ENDITEM,
                "Name=VENDORNUMBER", "Value=", ENDITEM,
                "Name=ADDRESSCODE", "Value=", ENDITEM,
                "Name=ADDRESSNAME", "Value=", ENDITEM,
                "Name=EI_define_1", "Value=", ENDITEM,
                "Name=EI_define_2", "Value=", ENDITEM,
                "Name=EI_define_3", "Value=", ENDITEM,
                "Name=sumAMOUNT", "Value=0.00", ENDITEM,
                "Name=REMARKS", "Value=", ENDITEM,
                EXTRARES,
                "Url=../images/main/mouseOverBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp", ENDITEM,
                LAST);


        lr_end_transaction("add", LR_AUTO);

        return 0;
}

xinyu2119 发表于 2011-4-12 17:10:27

晕,兄弟,你真厉害,居然把脚本都贴出来了
http500错是因为Internal Server Error,你只要把出错地方的前后贴出来就可以了

xinyu2119 发表于 2011-4-12 17:32:12

1. 检查下是不是有需要关联的地方,我看你脚本里有个ExclusiveID=1010706和ExclusiveID=7356313,这两个的值是不一样的,卡看是不是需要关联下
2. 脚本里有乱码,是中文字符还是什么?看看是不是需要支持下UTF-8

另外脚本除了做参数化以外,你可以将脚本优化下,里面很多没用的东西都可以删除掉像
EXTRARES,
"Url=../images/main/mouseOverBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp", ENDITEM,
这种东西,没用就删掉

xinyu2119 发表于 2011-4-12 17:36:01

1. 脚本是不是需要做下关联?ExclusiveID=1010706和ExclusiveID=7356313的值是不一样的,你看看这个地方是不是需要关联
2. 脚本里有乱码,是中文字符还是什么?看看是不是需要支持UTF-8

另外你的脚本可以优化下,里面很多没用的东西都可以删除掉,像
EXTRARES,
"Url=../images/main/mouseOverBg.jpg", "Referer=http://192.168.150.18:2010/inventory/inv_elsein_list.asp", ENDITEM,

一般来说EXTRARES后面的东西都没啥用,可以删除掉的
页: [1]
查看完整版本: LR负载压力测试2个用户时而都通过,时而只通过一个?急急急