51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1973|回复: 7
打印 上一主题 下一主题

[原创] 难道没有可以关联的东东么·····

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-4-20 17:27:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
公司一个小工时填报系统,bs架构的,录制的填报记录部分脚本如下:

web_url("submit",
                "URL=http://192.168.89.99/timesheet/singleentry/submit?selRowsData=%7B%22record0%22%3A%5B%7B%22department%22%3A%22DD%22%2C%22project%22%3A%22PT001%22%2C%22task%22%3A%22E001%E6%B5%8B%E8%AF%95%E6%96%87%E6%A1%A3%E5%87%86%E5%A4%87%E6%98%8E%E7%A1%AE%22%2C%22subtask%22%3A%22%22%2C%22normaltime%22%3A%220.8%22%2C%22beyondtime%22%3A%220.0%22%2C%22overtime%22%3A%220.0%22%2C%22remark%22%3A%22%22%2C%22timesheetid%22%3A%220%22%2C%22version%22%3A%220%22%7D%5D%7D&recordsNum=1&entryDate=2010-07-15",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.89.99/timesheet/singleentry/index",
                "Snapshot=t6.inf",
                "Mode=HTML",
                LAST);

请求的内容在URL里面,跟开发人员也都明确了selRowsData、record、timesheetid、version四部分是固定不变的,不需要关联;department、project、task、subtask、normaltime、beyondtime、overtime、remark、ecordsNum、entryDate为用户输入,须参数化,看上去似乎不需要进行关联什么。
该脚本在回放的时候也没报啥错
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2010-4-20 17:28:24 | 只看该作者
回放log

Action.c(104): Redirecting "http://192.168.89.99/timesheet/singleentry/submit?selRowsData=%7B%22record0%22%3A%5B%7B%22department%22%3A%22DD%22%2C%22project%22%3A%22PT001%22%2C%22task%22%3A%22E001%E6%B5%8B%E8%AF%95%E6%96%87%E6%A1%A3%E5%87%86%E5%A4%87%E6%98%8E%E7%A1%AE%22%2C%22subtask%22%3A%22%22%2C%22normaltime%22%3A%220.8%22%2C%22beyondtime%22%3A%220.0%22%2C%22overtime%22%3A%220.0%22%2C%22remark%22%3A%22%22%2C%22timesheetid%22%3A%220%22%2C%22version%22%3A%220%22%7D%5D%7D&recordsNum=1&entryDate=2010-07-15" (redirection depth is 0)          [MsgId: MMSG-26694]
Action.c(104): To location "http://192.168.89.99/timesheet/singleentry/index"          [MsgId: MMSG-26693]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/styles/ts_styles_amethyst.css" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/ts_scripts.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/styles/ddsmoothmenu.css" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/styles/ddsmoothmenu-v.css" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery-1.3.2.min.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/jquery/jquery-1.3.2.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/grid/jquery-ui-1.7.1.custom.min.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/styles/layer_amethyst.css" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/ddsmoothmenu.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/images/icon/amethyst/logo_with_background.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/images/menu/amethyst/index.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/images/menu/amethyst/report.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/images/menu/amethyst/approve.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/images/menu/amethyst/work_plan.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/images/menu/amethyst/setup.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/images/menu/amethyst/admin.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/images/menu/amethyst/statistics.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/images/menu/amethyst/backup.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/images/menu/amethyst/help.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/images/menu/amethyst/exit.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/validate/ts_public_validate.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/jquery/jquery-1.3.2.min.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/jquery/json/jquery.json-2.2.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/jquery/json/jquery.json-2.2.min.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/grid/jquery.layout.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/grid/grid.locale-en.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/grid/jquery.jqGrid.min.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/grid/jquery.tablednd.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/grid/jquery.contextmenu.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/calendar/zapatec.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/calendar/calendar.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/calendar/calendar-bg.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/calendar/calendar-big5.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/grid/themes/ui.jqgrid.css" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/grid/themes/redmond/jquery-ui-1.7.1.custom.amethyst.css" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/calendar/themes/aqua.css" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/scripts/jquery/calendar/themes/icons/calendar2.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/images/icon/amethyst/background.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Resource "http://192.168.89.99/timesheet/public/images/icon/amethyst/company_logo.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(104): Registered web_reg_find successful for "Text=data_saved" (count=5)          [MsgId: MMSG-26364]
Action.c(104): web_url("submit") was successful, 103595 body bytes, 804 header bytes, 14 chunking overhead bytes          [MsgId: MMSG-26385]
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2010-4-20 17:31:14 | 只看该作者
但是db没有进行插入操作,除了哪里该关联的没有关联,我真的没方向去找了,
ps:session id是从cookie中拿到的,这个应该不用关联吧··而且···我都找不到能让我关联的地方--!
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2010-4-21 09:21:41 | 只看该作者
么人看么··自己先顶一下··
回复 支持 反对

使用道具 举报

  • TA的每日心情
    奋斗
    2015-6-25 18:04
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    5#
    发表于 2010-4-21 10:03:17 | 只看该作者
    这个提交步骤前,需要登录是么?
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    郁闷
    2015-6-16 14:29
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    6#
    发表于 2010-4-21 10:12:43 | 只看该作者
    1、先检查业务,最好画出业务流程图,分析可能出问题的地方
    2、插入成功后是否有信息提示,如有可加检查点判断;
    3、手动分析是否需要关联。或者系统是否有唯一性要求
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    7#
     楼主| 发表于 2010-4-21 14:01:33 | 只看该作者
    谢谢楼上两位提示,现在的问题大概是这样,提交这个操作是用JQuery实现的,录制脚本的时候web_url("submit"
    这个动作是,LR抓的是server返回的提交成功状态返回的数组,如下:
    锘縶"data_saved":[],"data_record":[{"status_record":"\u5df2\u63d0\u4ea4","department_record":"DD","project_record":"PT001","task_record":"E001\u6d4b\u8bd5\u6587\u6863\u51c6\u5907\u660e\u786e","subtask_record":"","normaltime_record":"0.8","beyondtime_record":"0.0","overtime_record":"0.0","remark_record":"","reject_reason_record":"","timesheetid_record":"209","version_record":"1"}],"lackedDate":["2010-04-09","2010-04-12","2010-04-13","2010-04-14"],"lack_more":1,"url":""}

    data_record部分返回的是插入成功的那条记录相关字段值,用于http://192.168.89.99/timesheet/singleentry/index这个页面上显示刚才提交成功的那条记录

    今天上午我试着用web_reg_save_param抓回放时取data_record":[{"  与 lackedDate 之间的内容,但是返回的内容却是http://192.168.89.99/timesheet/singleentry/index上面的,server返回的数组内容抓不到····
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    8#
     楼主| 发表于 2010-4-21 14:07:42 | 只看该作者
    原帖由 qiguojie 于 2010-4-21 10:03 发表
    这个提交步骤前,需要登录是么?

    这个是需要登录的,前面录制的登录脚本能够正确登录上去,登录后生成session_id保存在cookie里面
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-11-8 06:53 , Processed in 0.070654 second(s), 25 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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