loadrunner参数化
1.我录制了一段“新增”“删除”的脚本登录—选择一个机构—新增一个用户组—删除用户组(说明机构是左边的树,属性中有唯一标识符,新建用户组也会自动生成一个唯一的标识符)
2.怎样才能参数化这个唯一标识符? 用脚本去跑 新增了就删除不掉了 原因唯一标识符
新增脚本如下
lr_think_time(12);
web_submit_data("groupAction.action",
"Action=http://192.168.130.10:8000/org/groupAction.action",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.130.10:8000/org/index.jsp",
"Snapshot=t21.inf",
"Mode=HTML",
ITEMDATA,
"Name=operation", "Value=save", ENDITEM,
"Name=node", "Value=__6a6EOZ-EeGEWewGf69Qhg", ENDITEM,
"Name=group.id", "Value=(会自动分配一个唯一的标识符)", ENDITEM,
"Name=group.name", "Value=test", ENDITEM,
"Name=group.description", "Value=", ENDITEM,
EXTRARES,
"Url=../extjs/3.4/resources/images/default/qtip/bg.gif", "Referer=http://192.168.130.10:8000/org/index.jsp", ENDITEM,
"Url=../extjs/3.4/resources/images/default/window/icon-info.gif", "Referer=http://192.168.130.10:8000/org/index.jsp", ENDITEM,
"Url=../extjs/3.4/resources/images/default/progress/progress-bg.gif", "Referer=http://192.168.130.10:8000/org/index.jsp", ENDITEM,
"Url=../extjs/3.4/resources/images/default/tree/loading.gif", "Referer=http://192.168.130.10:8000/org/index.jsp", ENDITEM,
LAST);
web_submit_data("orgTree.action_3",
"Action=http://192.168.130.10:8000/org/orgTree.action",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.130.10:8000/org/index.jsp",
"Snapshot=t22.inf",
"Mode=HTML",
ITEMDATA,
"Name=orgType", "Value=Organization", ENDITEM,
"Name=node", "Value=__6a6EOZ-EeGEWewGf69Qhg", ENDITEM,
LAST);
return 0;
}
删除脚本如下:
web_submit_data("groupAction.action_2",
"Action=http://192.168.130.10:8000/org/groupAction.action",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.130.10:8000/org/index.jsp",
"Snapshot=t27.inf",
"Mode=HTML",
ITEMDATA,
"Name=operation", "Value=delete", ENDITEM,
下面valued=_KB6Jseg7EeGEwf2MA7_N6w就是新增用户组的唯一标识符
"Name=node", "Value=_KB6Jseg7EeGEwf2MA7_N6w", ENDITEM,
LAST);
web_url("default.jsp_2",
"URL=http://192.168.130.10:8000/org/display/default.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.130.10:8000/org/index.jsp",
"Snapshot=t28.inf",
"Mode=HTML",
LAST);
4.要怎么才能我新增了就可以删除,我是新手求解,可加QQ925532022 请标注51test谢谢 用关联可以解决,具体方法去网上找吧。 在tree view中去找这个标识符出现过的地方,可以使,用关联,找到左右边界值在参数化 在submit请求前的一个请求前添加关联脚本 问题补充::valued=_KB6Jseg7EeGEwf2MA7_N6w 唯一标识符是自动生成的 每次都不一样 左边界 右边界都不一样 怎么关联?
页:
[1]