51Testing软件测试论坛
标题:
对编辑模板功能如何修改脚本?进行多用户并发,才能实现非录制用户真正编辑自己模板
[打印本页]
作者:
yimuhenanmu
时间:
2015-2-6 14:13
标题:
对编辑模板功能如何修改脚本?进行多用户并发,才能实现非录制用户真正编辑自己模板
现象:
web应用的申请单模板功能,用个用户登陆后,有自己的申请单列表,可选中某个记录进行编辑。现在要对编辑模板功能进行并发测试。
点击编辑按钮时,录制的脚本request 的url里包含一个templateID,服务器响应里会有一个登陆用户userid对应这个request。
问题:
怎么修改这个脚本,在并发测试时,让别的并发用户登陆后,也能对自己列表的模板编辑。
**********************
点击编辑按钮时的请求
web_custom_request("AccreditDocTemplateDetail.jsp",
"URL=http://10.26.16.95:8086/wbo/codm/employeeplatform/AccreditDocTemplateDetail.jsp?modify=1&1423128415781&
updateID=20150205-16185932-796E298C-8AED47BA
",
"Method=POST",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.26.16.95:8086/EmployeePlatformFrame.jsp?1423128305422",
"Snapshot=t27.inf",
"Mode=HTML",
"EncType=",
EXTRARES,
"Url=AccreditDocTemplateDetail.js", "Referer=http://10.26.16.95:8086/EmployeePlatformFrame.jsp?1423128305422", ENDITEM,
"Url=AccreditDocTemplateDetail.js?_=1423128415968", "Referer=http://10.26.16.95:8086/EmployeePlatformFrame.jsp?1423128305422", ENDITEM,
"Url=/js/jsTree/themes/default/d.png", "Referer=http://10.26.16.95:8086/EmployeePlatformFrame.jsp?1423128305422", ENDITEM,
"Url=/js/jsTree/themes/default/throbber.gif", "Referer=http://10.26.16.95:8086/EmployeePlatformFrame.jsp?1423128305422", ENDITEM,
LAST);
web_custom_request("FunctionServlet_15",
"URL=http://10.26.16.95:8086/servlet/FunctionServlet?console=WBO_Server&function=CodmEmployee&act=is_share_uemdb",
"Method=POST",
"TargetFrame=",
"Resource=0",
"RecContentType=application/json",
"Referer=http://10.26.16.95:8086/EmployeePlatformFrame.jsp?1423128305422",
"Snapshot=t28.inf",
"Mode=HTML",
"EncType=",
EXTRARES,
"Url=FunctionServlet?console=WBO_Server&function=CodmEmployee&act=get_audit_template_employee_tree&1423128416140&operation=get_children&code=topLevelTree&
templateCode=20150205-16185932-796E298C-8AED47BA
&isLimitTree=true", "Referer=http://10.26.16.95:8086/EmployeePlatformFrame.jsp?1423128305422", ENDITEM,
"Url=../js/jsTree/themes/default/home.gif", "Referer=http://10.26.16.95:8086/EmployeePlatformFrame.jsp?1423128305422", ENDITEM,
"Url=../js/jsTree/themes/default/Person.gif", "Referer=http://10.26.16.95:8086/EmployeePlatformFrame.jsp?1423128305422", ENDITEM,
LAST);
*************************************************
编辑后保存
web_submit_data("FunctionServlet_21",
"Action=http://10.26.16.95:8086/servlet/FunctionServlet?console=WBO_Server&function=EmployeeRequestForm&act=submitTemplate",
"Method=POST",
"TargetFrame=",
"RecContentType=application/json",
"Referer=http://10.26.16.95:8086/EmployeePlatformFrame.jsp?1423128305422",
"Snapshot=t34.inf",
"Mode=HTML",
ITEMDATA,
"Name=templateCode", "Value=20150205-16185932-796E298C-8AED47BA", ENDITEM,
"Name=isAdminTemplate", "Value=false", ENDITEM,
"Name=templageName", "Value=zyn1", ENDITEM,
"Name=templageDescribe", "Value=", ENDITEM,
"Name=enable_content_modify", "Value=on", ENDITEM,
"Name=restrict_date_begin", "Value=", ENDITEM,
"Name=restrict_date_end", "Value=", ENDITEM,
"Name=undeterminedgroupsids", "Value=", ENDITEM,
******************************
作者:
saharaqs
时间:
2015-2-9 11:00
用关联。
在用户登录时应该能获取到登录用户已有的模板id,在编辑的脚本中替换掉。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2