51Testing软件测试论坛
标题:
loadrunner中关联问题
[打印本页]
作者:
shuijianyun
时间:
2011-4-25 16:40
标题:
loadrunner中关联问题
我录制的脚本是创建一个项目,项目有项目名称和项目ID,名称可以重复,ID是由服务器返回来的,每次都是自加1(比如这次创建时是1100,下次就是1101)录制完了回放时候就会提示项目ID重复,我想把项目ID做关联,可是不知道它返回的是什么,求解答。如下是脚本:
作者:
shuijianyun
时间:
2011-4-25 16:41
脚本太长,,,超过字数限制了。
作者:
shuijianyun
时间:
2011-4-25 17:21
lr_start_transaction("新建");
web_set_max_html_param_len("1024");
lr_think_time(25);
web_url("projectManageMenuAction.do",
"URL=http://172.19.125.1:8080/project/wbs/projectManageMenuAction.do?projectID=0&typeID=1&parentID=0&parentName=&from=outlook",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://172.19.125.1:8080/project/index.jsp",
"Snapshot=t6.inf",
"Mode=HTML",
LAST);
web_url("financeMenuAction.do",
"URL=http://172.19.125.1:8080/project/wbs/financeMenuAction.do?from=outlook&projectID=0&typeID=1&parentID=0&parentName=&isopItem=0&UID=1100&r=6715.0353477960925",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://172.19.125.1:8080/project/wbs/projectManageMenuAction.do?projectID=0&typeID=1&parentID=0&parentName=&from=outlook",
"Snapshot=t7.inf",
"Mode=HTML",
LAST);
/* Registering parameter(s) from source task id 65
// {Siebel_Analytic_search_id5} = "0"
// */
web_reg_save_param("Siebel_Analytic_search_id5",
"LB/IC=sid=\"",
"RB/IC=\"",
"Ord=23",
"Search=Body",
"RelFrameId=1",
LAST);
/* Registering parameter(s) from source task id 65
// {Siebel_Analytic_search_id4} = "501"
// */
web_reg_save_param("Siebel_Analytic_search_id4",
"LB/IC=sid=\"",
"RB/IC=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
web_url("getPropertyAction.do",
"URL=http://172.19.125.1:8080/project/wbs/getPropertyAction.do?from=outlook&projectID=0&typeID=1&parentID=0&parentName=&isopItem=0&r=4855.337332710052",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://172.19.125.1:8080/project/wbs/financeMenuAction.do?from=outlook&projectID=0&typeID=1&parentID=0&parentName=&isopItem=0&UID=1100&r=6715.0353477960925",
"Snapshot=t8.inf",
"Mode=HTML",
LAST);
lr_think_time(24);
web_url("searchDepartment.jsp",
"URL=http://172.19.125.1:8{Siebel_Analytic_search_id5}8{Siebel_Analytic_search_id5}/project/share/searchDepartment.jsp",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t9.inf",
"Mode=HTML",
EXTRARES,
"Url=../images/system/btn.gif", ENDITEM,
LAST);
lr_think_time(12);
web_submit_data("searchDepartmentAction.do",
"Action=http://172.19.125.1:8{Siebel_Analytic_search_id5}8{Siebel_Analytic_search_id5}/project/share/searchDepartmentAction.do?purview={Siebel_Analytic_search_id5}",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://172.19.125.1:8{Siebel_Analytic_search_id5}8{Siebel_Analytic_search_id5}/project/share/searchDepartment.jsp",
"Snapshot=t10.inf",
"Mode=HTML",
ITEMDATA,
"Name=departmentCode", "Value=", ENDITEM,
"Name=departmentName", "Value=交付", ENDITEM,
"Name=parentDepartmentCode", "Value=", ENDITEM,
"Name=parentDepartmentName", "Value=", ENDITEM,
"Name=description", "Value=", ENDITEM,
"Name=roleID", "Value=null", ENDITEM,
"Name=actionName", "Value=null", ENDITEM,
"Name=pageNo", "Value=1", ENDITEM,
"Name=pageSize", "Value=1{Siebel_Analytic_search_id5}", ENDITEM,
"Name=obj", "Value=", ENDITEM,
LAST);
lr_think_time(8);
web_url("calendar.html",
"URL=http://172.19.125.1:8{Siebel_Analytic_search_id5}8{Siebel_Analytic_search_id5}/project/calendar/calendar.html",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t11.inf",
"Mode=HTML",
EXTRARES,
"Url=../images/calendar/arrow.gif", ENDITEM,
"Url=../images/calendar/MP.gif", ENDITEM,
"Url=../images/calendar/MN.gif", ENDITEM,
"Url=../images/calendar/arrow1.gif", ENDITEM,
LAST);
web_submit_data("calendar.html_2",
"Action=http://172.19.125.1:8{Siebel_Analytic_search_id5}8{Siebel_Analytic_search_id5}/project/calendar/calendar.html",
"Method=GET",
"EncType=",
"TargetFrame=",
"RecContentType=text/html",
"Referer=",
"Snapshot=t12.inf",
"Mode=HTML",
ITEMDATA,
LAST);
作者:
shuijianyun
时间:
2011-4-25 17:21
web_submit_data("calendar.html_3",
"Action=http://172.19.125.1:8{Siebel_Analytic_search_id5}8{Siebel_Analytic_search_id5}/project/calendar/calendar.html",
"Method=GET",
"EncType=",
"TargetFrame=",
"RecContentType=text/html",
"Referer=",
"Snapshot=t13.inf",
"Mode=HTML",
ITEMDATA,
LAST);
web_submit_data("calendar.html_4",
"Action=http://172.19.125.1:8{Siebel_Analytic_search_id5}8{Siebel_Analytic_search_id5}/project/calendar/calendar.html",
"Method=GET",
"EncType=",
"TargetFrame=",
"RecContentType=text/html",
"Referer=",
"Snapshot=t14.inf",
"Mode=HTML",
ITEMDATA,
LAST);
web_submit_data("addPropertyAction.do",
"Action=http://172.19.125.1:8{Siebel_Analytic_search_id5}8{Siebel_Analytic_search_id5}/project/wbs/addPropertyAction.do",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://172.19.125.1:8{Siebel_Analytic_search_id5}8{Siebel_Analytic_search_id5}/project/wbs/getPropertyAction.do?from=outlook&projectID={Siebel_Analytic_search_id5}&typeID=1&parentID={Siebel_Analytic_search_id5}&parentName=&isopItem={Siebel_Analytic_search_id5}&r=4855.33733271{Siebel_Analytic_search_id5}{Siebel_Analytic_search_id5}52",
"Snapshot=t15.inf",
"Mode=HTML",
ITEMDATA,
"Name=projectName", "Value=success", ENDITEM,
"Name=projectCode", "Value=11{Siebel_Analytic_search_id5}{Siebel_Analytic_search_id5}{Siebel_Analytic_search_id5}55", ENDITEM,
"Name=description", "Value=", ENDITEM,
"Name=projectType", "Value=5{Siebel_Analytic_search_id5}7", ENDITEM,
"Name=projectStatus", "Value=启动", ENDITEM,
"Name=priorityTypeID", "Value=1", ENDITEM,
"Name=remark", "Value=", ENDITEM,
"Name=tracktype", "Value=4", ENDITEM,
"Name=tracktype", "Value=4", ENDITEM,
"Name=trackMode", "Value=1", ENDITEM,
"Name=pptype", "Value=1", ENDITEM,
"Name=timesheetmode1", "Value=4", ENDITEM,
"Name=departmentName", "Value=交付一部", ENDITEM,
"Name=parentProjectName", "Value=", ENDITEM,
"Name=roleID4", "Value=", ENDITEM,
"Name=roleID16", "Value=", ENDITEM,
"Name=roleID17", "Value=", ENDITEM,
"Name=roleID18", "Value=", ENDITEM,
"Name=roleID19", "Value=", ENDITEM,
"Name=roleID2{Siebel_Analytic_search_id5}", "Value=", ENDITEM,
"Name=roleID21", "Value=", ENDITEM,
"Name=roleID25", "Value=", ENDITEM,
"Name=requireStartDate", "Value=2{Siebel_Analytic_search_id5}11-{Siebel_Analytic_search_id5}4-{Siebel_Analytic_search_id5}1", ENDITEM,
"Name=requireEndDate", "Value=2{Siebel_Analytic_search_id5}11-{Siebel_Analytic_search_id5}4-3{Siebel_Analytic_search_id5}", ENDITEM,
"Name=planStartDate", "Value=2{Siebel_Analytic_search_id5}11-{Siebel_Analytic_search_id5}4-{Siebel_Analytic_search_id5}2", ENDITEM,
"Name=planEndDate", "Value=2{Siebel_Analytic_search_id5}11-{Siebel_Analytic_search_id5}4-29", ENDITEM,
"Name=actualStartDate", "Value=", ENDITEM,
"Name=actualEndDate", "Value=", ENDITEM,
"Name=startYear", "Value=2{Siebel_Analytic_search_id5}{Siebel_Analytic_search_id5}9", ENDITEM,
"Name=charac_S_511_{Siebel_Analytic_search_id5}", "Value=", ENDITEM,
"Name=charac_S_512_{Siebel_Analytic_search_id5}", "Value=", ENDITEM,
"Name=from", "Value=outlook", ENDITEM,
"Name=addmenuUID", "Value={Siebel_Analytic_search_id5}", ENDITEM,
"Name=projectID", "Value={Siebel_Analytic_search_id5}", ENDITEM,
"Name=projectStatusID", "Value={Siebel_Analytic_search_id4}", ENDITEM,
"Name=departmentID", "Value=523", ENDITEM,
"Name=parentProjectID", "Value={Siebel_Analytic_search_id5}", ENDITEM,
"Name=oldParentID", "Value={Siebel_Analytic_search_id5}", ENDITEM,
"Name=typeID", "Value=1", ENDITEM,
"Name=isopItem", "Value={Siebel_Analytic_search_id5}", ENDITEM,
"Name=sequenceKey", "Value=", ENDITEM,
"Name=effortMode", "Value=1", ENDITEM,
"Name=timesheetmode", "Value=4", ENDITEM,
"Name=taskMode", "Value={Siebel_Analytic_search_id5}", ENDITEM,
"Name=oldProjectName", "Value=", ENDITEM,
"Name=scheduleIndicatorDefault", "Value={Siebel_Analytic_search_id5}", ENDITEM,
"Name=costIndicatorDefault", "Value={Siebel_Analytic_search_id5}", ENDITEM,
"Name=benefitIndicatorDefault", "Value={Siebel_Analytic_search_id5}", ENDITEM,
"Name=riskIndicatorDefault", "Value={Siebel_Analytic_search_id5}", ENDITEM,
"Name=roleID", "Value=4", ENDITEM,
"Name=userID4", "Value=", ENDITEM,
"Name=roleID", "Value=16", ENDITEM,
"Name=userID16", "Value=", ENDITEM,
"Name=roleID", "Value=17", ENDITEM,
"Name=userID17", "Value=", ENDITEM,
"Name=roleID", "Value=18", ENDITEM,
"Name=userID18", "Value=", ENDITEM,
"Name=roleID", "Value=19", ENDITEM,
"Name=userID19", "Value=", ENDITEM,
"Name=roleID", "Value=2{Siebel_Analytic_search_id5}", ENDITEM,
"Name=userID2{Siebel_Analytic_search_id5}", "Value=", ENDITEM,
"Name=roleID", "Value=21", ENDITEM,
"Name=userID21", "Value=", ENDITEM,
"Name=roleID", "Value=25", ENDITEM,
"Name=userID25", "Value=", ENDITEM,
"Name=statusValue", "Value=5{Siebel_Analytic_search_id5}6;关闭", ENDITEM,
"Name=statusValue", "Value=5{Siebel_Analytic_search_id5}4;结项", ENDITEM,
"Name=statusValue", "Value=585;立项", ENDITEM,
"Name=statusValue", "Value={Siebel_Analytic_search_id4};启动", ENDITEM,
"Name=statusValue", "Value=5{Siebel_Analytic_search_id5}3;实施", ENDITEM,
"Name=statusValue", "Value=5{Siebel_Analytic_search_id5}5;售后", ENDITEM,
"Name=statusValue", "Value=5{Siebel_Analytic_search_id5}2;售前", ENDITEM,
EXTRARES,
"Url=../images/loading_bar3.gif", "Referer=http://172.19.125.1:8{Siebel_Analytic_search_id5}8{Siebel_Analytic_search_id5}/project/bottom.jsp", ENDITEM,
LAST);
web_url("financeMenuAction.do_2",
"URL=http://172.19.125.1:8{Siebel_Analytic_search_id5}8{Siebel_Analytic_search_id5}/project/wbs/financeMenuAction.do?projectID=641&typeID=1&parentID=null&parentName=null&isopItem={Siebel_Analytic_search_id5}&UID=11{Siebel_Analytic_search_id5}{Siebel_Analytic_search_id5}&fromType=&stepid=&flowid=&r=652.27{Siebel_Analytic_search_id5}2279437193",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://172.19.125.1:8{Siebel_Analytic_search_id5}8{Siebel_Analytic_search_id5}/project/wbs/addPropertyAction.do",
"Snapshot=t16.inf",
"Mode=HTML",
LAST);
web_url("projectSummaryAction.do",
"URL=http://172.19.125.1:8{Siebel_Analytic_search_id5}8{Siebel_Analytic_search_id5}/project/wbs/projectSummaryAction.do?projectID=641&typeID=1&fromType=&stepid=&flowid=&r=8539.21656872{Siebel_Analytic_search_id5}186",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://172.19.125.1:8{Siebel_Analytic_search_id5}8{Siebel_Analytic_search_id5}/project/wbs/financeMenuAction.do?projectID=641&typeID=1&parentID=null&parentName=null&isopItem={Siebel_Analytic_search_id5}&UID=11{Siebel_Analytic_search_id5}{Siebel_Analytic_search_id5}&fromType=&stepid=&flowid=&r=652.27{Siebel_Analytic_search_id5}2279437193",
"Snapshot=t17.inf",
"Mode=HTML",
LAST);
lr_end_transaction("新建",LR_AUTO);
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2