51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1252|回复: 1
打印 上一主题 下一主题

[求助] 对编辑模板功能如何修改脚本?进行多用户并发,才能实现非录制用户真正编辑自己模板

[复制链接]
  • TA的每日心情
    开心
    2016-1-22 08:21
  • 签到天数: 2 天

    连续签到: 2 天

    [LV.1]测试小兵

    跳转到指定楼层
    1#
    发表于 2015-2-6 14:13:56 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    现象: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,



    ******************************
    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
    收藏收藏
    回复

    使用道具 举报

  • TA的每日心情
    慵懒
    2019-9-27 12:46
  • 签到天数: 179 天

    连续签到: 1 天

    [LV.7]测试师长

    2#
    发表于 2015-2-9 11:00:33 | 只看该作者
    用关联。
    在用户登录时应该能获取到登录用户已有的模板id,在编辑的脚本中替换掉。
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-9-25 00:38 , Processed in 0.069099 second(s), 23 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表