LR参数化问题
LR参数化脚本后,回放不走参数列表?请问是不是我哪设置得不对,只有原录制的那个一参数可以;我这人系统是录入个人资料,关键字是身份证号,我改变就是身份证参数;eb_submit_data("InsertItemTrain.aspx",
"Action=http://192.168.0.19:801/web/Training/InsertItemTrain.aspx?course_id=15448&isSeriesNo=false",
"Method=POST",
"EncType=multipart/form-data",
"RecContentType=text/html",
"Referer=http://192.168.0.19:801/web/Training/InsertItemTrain.aspx?course_id=15448&isSeriesNo=false",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState4}", ENDITEM,
"Name=RadFormDecorator1_ClientState", "Value=", ENDITEM,
"Name=MainRadWindowManager_ClientState", "Value=", ENDITEM,
"Name=txtCardNumBase", "Value={NewParam}", ENDITEM,
"Name=btnCheckCardNum", "Value=楠岃瘉 >>", ENDITEM,
"Name=txtSeriesNo", "Value=", ENDITEM,
"Name=txtName", "Value=", ENDITEM,
"Name=txtIdentity", "Value=", ENDITEM,
"Name=fileUpload", "Value=", "File=yes", ENDITEM,
"Name=__EVENTVALIDATION", "Value=/wEWDAKsiZXVDAKBrNSSAgLt252FDQKuk6fDCgKF9IT6BQLEhISFCwKOsfKTCQLvjry/BQLt3oXMAwLCi9reAwL+6YyoCgKK+sjUBw==", ENDITEM,
LAST);
web_add_cookie("__utmb=148375159.5.10.1243838888; DOMAIN=192.168.0.19");
web_custom_request("GetIdentityInfo.aspx",
"URL=http://192.168.0.19:801/web/GetIdentityInfo.aspx?cerf={NewParam}",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15448&cerf_num=440437197007150553&isSeriesNo=false",
"Snapshot=t5.inf",
"Mode=HTML",
"EncType=",
EXTRARES,
"URL=http://www.google-analytics.com/__utm.gif?utmwv=4.3&utmn=305894421&utmhn=192.168.0.19&utmcs=utf-8&utmsr=1280x1024&utmsc=32-bit&utmul=zh-cn&utmje=1&utmfl=10.0%20r22&utmhid=2080727530&utmr=0&utmp=/web/Training/InsertItemTrainNext.aspx?course_id=15448&cerf_num=440437197007150553&isSeriesNo=false&utmac=UA-6771362-2&utmcc=__utma%3D148375159.2369720308651925500.1243224185.1243838632.1243838888.39%3B%2B__utmz%3D148375159.1243224185.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B", "Referer=http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15448&cerf_num=440437197007150553&isSeriesNo=false", ENDITEM,
"URL=../WebResource.axd?d=pQU6MJPbodMbEKQ1LuEnQe-KN8qpbleUoXCKbxBOxPRCiRxsHOph7cP7ScPQhlrMZVOSZGybfsrtbmnjRTKf0lg2sBhJY08w5IE-bSUUoIEQS8SigDwcVRqkjFdc2icy0&t=633718639428503750", "Referer=http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15448&cerf_num=440437197007150553&isSeriesNo=false", ENDITEM,
LAST);
lr_think_time(14);
[ 本帖最后由 jaxcon 于 2009-6-1 17:22 编辑 ] 你回放几次? 你在run上设置x3那么参数就会取3个 这段脚本是否放在action下面 ?
另外你看一下run-time setting设置脚本迭代次数是多少,如果是一次,那么执行每次都只能取到第一个身份证号。
你可以在参数下面写个打印语句观察一下不同迭代次数的取值情况(lr_error_message) RUN TIME SETTINGS改成3次.
或者外面加个循环.并且把UPDATE VALUE ON改成Each occurance. 查看虚拟用户数,如果只有一个虚拟用户你必须增加迭代次数,如果三个虚拟用户你必须修改UPDATE VALUE ON 的值为Each occurance,其实你可以点击simulate parameter按钮查看一下参数具体是怎么分配的
谢谢各位的回答
谢谢各位的回答,我这个脚本是在action里面的,迭代也设置了3次,
无论我将录制时的身份证放在参数列表的哪个位置,回放3次,都只有这一个记录有插入;
其它的身份证就是没有记录,
而且我用参数表替换了所有脚本出现的那个身份证号,回放结果也一样!
看看我还有什么没做好的! 试过了,用另一身份证号直接替换脚本里的所有原录制的身份证,也是没记录出来,这也是太奇怪了 难道是乱码的缘故,?是不是有这个可能,大哥?这个检查语句的中文乱码了!
回复 12# 的帖子
一直有打开那个页面刷新查看,就是没记录,,,就是只有录制时的那个记录; 噢,,display过程中,是发生未知错误, 可以帮忙看看是怎么回事吗?这是全部的脚本过程Action()
{web_add_cookie("__utmb=148375159.3.10.1242892714; DOMAIN=192.168.0.19");
web_set_max_html_param_len("2432");
lr_think_time(4);
web_url("InsertItemTrain.aspx",
"URL=http://192.168.0.19:801/web/Training/InsertItemTrain.aspx?course_id=15468&isSeriesNo=false",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.0.19:801/web/Training/ItemMain.aspx",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=../Picture/Imgs/pici_top.gif", "Referer=http://192.168.0.19:801/web/Training/InsertItemTrain.aspx?course_id=15468&isSeriesNo=false", ENDITEM,
"Url=../picture/DataGrid.htc", "Referer=", ENDITEM,
"Url=http://www.google-analytics.com/__utm.gif?utmwv=4.3&utmn=1784487331&utmhn=192.168.0.19&utmcs=utf-8&utmsr=1280x1024&utmsc=32-bit&utmul=zh-cn&utmje=1&utmfl=10.0%20r22&utmdt=%E6%97%A0%E6%A0%87%E9%A2%98%E9%A1%B5&utmhid=2051461590&utmr=0&utmp=/web/Training/InsertItemTrain.aspx?course_id=15468&isSeriesNo=false&utmac=UA-6771362-2&utmcc=__utma%3D148375159.3796988193712948700.1242885152.1242892668.1242892714.3%3B%2B__utmz%3D148375159.1242885152.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none"
")%3B", "Referer=http://192.168.0.19:801/web/Training/InsertItemTrain.aspx?course_id=15468&isSeriesNo=false", ENDITEM,
LAST);
web_add_cookie("__utmb=148375159.4.10.1242892714; DOMAIN=192.168.0.19");
web_reg_save_param("Siebel_Analytic_ViewState5",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
web_submit_form("InsertItemTrain.aspx_2",
"Snapshot=t4.inf",
ITEMDATA,
"Name=txtCardNumBase", "Value={NewParam}", ENDITEM,
"Name=txtSeriesNo", "Value=", ENDITEM,
"Name=txtName", "Value=", ENDITEM,
"Name=txtIdentity", "Value=", ENDITEM,
"Name=fileUpload", "Value=", "File=Yes", ENDITEM,
"Name=btnCheckCardNum", "Value=楠岃瘉 >>", ENDITEM,
LAST);
web_add_cookie("__utmb=148375159.5.10.1242892714; DOMAIN=192.168.0.19");
web_custom_request("GetIdentityInfo.aspx",
"URL=http://192.168.0.19:801/web/GetIdentityInfo.aspx?cerf={NewParam}",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num={NewParam}&isSeriesNo=false",
"Snapshot=t5.inf",
"Mode=HTML",
"EncType=",
EXTRARES,
"Url=../WebResource.axd?d=pQU6MJPbodMbEKQ1LuEnQe-KN8qpbleUoXCKbxBOxPRCiRxsHOph7cP7ScPQhlrMZVOSZGybfsrtbmnjRTKf0lg2sBhJY08w5IE-bSUUoIEQS8SigDwcVRqkjFdc2icy0&t=633718639428503750", "Referer=http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num={NewParam}&isSeriesNo=false", ENDITEM,
"Url=http://www.google-analytics.com/__utm.gif?utmwv=4.3&utmn=261845572&utmhn=192.168.0.19&utmcs=utf-8&utmsr=1280x1024&utmsc=32-bit&utmul=zh-cn&utmje=1&utmfl=10.0%20r22&utmhid=465529509&utmr=0&utmp=/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num={NewParam}&isSeriesNo=false&utmac=UA-6771362-2&utmcc=__utma%3D148375159.3796988193712948700.1242885152.1242892668.1242892714.3%3B%2B__utmz%3D148375159.1242885152.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B", "Refere"
"r=http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num={NewParam}&isSeriesNo=false", ENDITEM,
LAST);
lr_think_time(13);
web_submit_data("InsertItemTrainNext.aspx",
"Action=http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num={NewParam}&isSeriesNo=false",
"Method=POST",
"EncType=multipart/form-data",
"RecContentType=text/html",
"Referer=http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num={NewParam}&isSeriesNo=false",
"Snapshot=t6.inf",
"Mode=HTML",
ITEMDATA,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState5}", ENDITEM,
"Name=RadFormDecorator1_ClientState", "Value=", ENDITEM,
"Name=MainRadWindowManager_ClientState", "Value=", ENDITEM,
"Name=GDTempWorker1:txtName", "Value=11111", ENDITEM,
"Name=GDTempWorker1:txtFileNum", "Value=11111", ENDITEM,
"Name=GDTempWorker1:txtNation", "Value=11111", ENDITEM,
"Name=GDTempWorker1:ddlCultID", "Value=1", ENDITEM,
"Name=GDTempWorker1:ddlSex", "Value=0", ENDITEM,
"Name=GDTempWorker1:txtHomePhone", "Value=111111", ENDITEM,
"Name=GDTempWorker1:txtBirthday", "Value=1977-8-3", ENDITEM,
"Name=GDTempWorker1:filPhoto", "Value=", "File=Yes", ENDITEM,
"Name=GDTempWorker1:txtNative", "Value=骞夸笢鐪佹繁鍦冲競", ENDITEM,
"Name=GDTempWorker1:txtContact", "Value=111111", ENDITEM,
"Name=GDTempWorker1:ddlType", "Value=1", ENDITEM,
"Name=GDTempWorker1:txtYear", "Value=2000", ENDITEM,
"Name=GDTempWorker1:txtAddress", "Value=骞夸笢鐪佹繁鍦冲競", ENDITEM,
"Name=GDTempWorker1:ckbIaGrant", "Value=on", ENDITEM,
"Name=GDTempWorker1:txtMemo", "Value=浠\\x8E2000骞村紑濮嬩粠浜嬪缓绛戣\xA1\x8C涓\\x9A.", ENDITEM,
"Name=btnSave", "Value=淇\\x9D 瀛\\x98", ENDITEM,
"Name=__EVENTVALIDATION", "Value=/wEWUgL9wsj1BAKGqquZCALQu9DZDwKXoMnwCAKcueXuBgLY95qPCQLZ95qPCQLa95qPCQLb95qPCQLc95qPCQLd95qPCQLe95qPCQLP95qPCQLA95qPCQL3wuL/BgLowuL/"
"
"jlBQLG4LurCAKct7iSDALomq/CAw==", ENDITEM,
LAST);
web_add_cookie("__utmb=148375159.6.10.1242892714; DOMAIN=192.168.0.19");
web_custom_request("GetIdentityInfo.aspx_2",
"URL=http://192.168.0.19:801/web/GetIdentityInfo.aspx?cerf={NewParam}",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num={NewParam}&isSeriesNo=false",
"Snapshot=t7.inf",
"Mode=HTML",
"EncType=",
EXTRARES,
"Url=http://www.google-analytics.com/__utm.gif?utmwv=4.3&utmn=1306772078&utmhn=192.168.0.19&utmcs=utf-8&utmsr=1280x1024&utmsc=32-bit&utmul=zh-cn&utmje=1&utmfl=10.0%20r22&utmhid=495174213&utmr=0&utmp=/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num={NewParam}&isSeriesNo=false&utmac=UA-6771362-2&utmcc=__utma%3D148375159.3796988193712948700.1242885152.1242892668.1242892714.3%3B%2B__utmz%3D148375159.1242885152.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B", "Refer"
"er=http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num={NewParam}&isSeriesNo=false", ENDITEM,
"Url=../WebResource.axd?d=pQU6MJPbodMbEKQ1LuEnQe-KN8qpbleUoXCKbxBOxPT5QaToJeKTPg7ZPqjXhUq4Tuln-DhDMD_RTu1aXGsEMA2&t=633718639428503750", "Referer=http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num={NewParam}&isSeriesNo=false", ENDITEM,
"Url=../WebResource.axd?d=pQU6MJPbodMbEKQ1LuEnQe-KN8qpbleUoXCKbxBOxPT5QaToJeKTPg7ZPqjXhUq4ScWv6PwZNAJYQIt67m2LG1lWpDUTHgdu3e1WEmsEkiU1&t=633718639428503750", "Referer=http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num={NewParam}&isSeriesNo=false", ENDITEM,
"Url=../WebResource.axd?d=pQU6MJPbodMbEKQ1LuEnQe-KN8qpbleUoXCKbxBOxPT5QaToJeKTPg7ZPqjXhUq4QHyJ4qJel2gsgkLkyAEyIw2&t=633718639428503750", "Referer=http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num={NewParam}&isSeriesNo=false", ENDITEM,
"Url=../WebResource.axd?d=pQU6MJPbodMbEKQ1LuEnQe-KN8qpbleUoXCKbxBOxPT5QaToJeKTPg7ZPqjXhUq4xp9tfLQ_K4BGtt2lAv0WV0cGtZmD5t-vX_tsSOMM2Ew1&t=633718639428503750", "Referer=http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num={NewParam}&isSeriesNo=false", ENDITEM,
"Url=../WebResource.axd?d=pQU6MJPbodMbEKQ1LuEnQe-
LAST);
web_url("InsertItemTrain.aspx_3",
"URL=http://192.168.0.19:801/web/Training/InsertItemTrain.aspx?course_id=15468&isSeriesNo=false",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.0.19:801/web/Training/ItemIndex.aspx",
"Snapshot=t8.inf",
"Mode=HTML",
EXTRARES,
"Url=http://www.google-analytics.com/__utm.gif?utmwv=4.3&utmn=486454126&utmhn=192.168.0.19&utmcs=utf-8&utmsr=1280x1024&utmsc=32-bit&utmul=zh-cn&utmje=1&utmfl=10.0%20r22&utmdt=%E6%97%A0%E6%A0%87%E9%A2%98%E9%A1%B5&utmhid=1945061648&utmr=0&utmp=/web/Training/InsertItemTrain.aspx?course_id=15468&isSeriesNo=false&utmac=UA-6771362-2&utmcc=__utma%3D148375159.3796988193712948700.1242885152.1242892668.1242892714.3%3B%2B__utmz%3D148375159.1242885152.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)"
"%3B", "Referer=http://192.168.0.19:801/web/Training/InsertItemTrain.aspx?course_id=15468&isSeriesNo=false", ENDITEM,
LAST);
return 0;
} 已经设置过,只解决登陆部份中文不乱码,,进入后,还是乱码! 我以前好像也遇到过类似的问题,可能与关联设置有关!!! 你把LR的日志打开.然后COPY出来给我看看。 问下手动输入你列表中的省份证号码有成功吗? 请问兄台,关联处理,具体要怎么做?,
脚本语言不怎么会看呀!
回复 22# 的帖子
没成功过,列表中只要不是录制的那个身份证号,就不行!回复 21# 的帖子
这是回放的部份日志,应该是这里出错,但不知道怎么修改!Action.c(128): Warning -26490: File name in a multipart submit is missing or empty. Using an empty file
Action.c(128): Downloading resource "http://www.google-analytics.com/__utm.gif?utmwv=4.3&utmn=2063863945&utmhn=192.168.0.19&utmcs=utf-8&utmsr=1280x1024&utmsc=32-bit&utmul=zh-cn&utmje=1&utmfl=10.0%20r22&utmhid=625753486&utmr=0&utmp=/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num=440724198309131533&isSeriesNo=false&utmac=UA-6771362-2&utmcc=__utma%3D148375159.2369720308651925500.1243224185.1243991431.1243991642.58%3B%2B__utmz%3D148375159.1243224185.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B" (specified by argument number 78)
Action.c(128): Redirecting "http://192.168.0.19:801/web/Training/InsertItemTrainNext.aspx?course_id=15468&cerf_num=440724198309131533&isSeriesNo=false" (redirection depth is 0)
Action.c(128): To location "http://192.168.0.19:801/web/error.htm?id=8025" 感觉应该是关联的问题吧
页:
[1]
2