难道没有可以关联的东东么·····
公司一个小工时填报系统,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为用户输入,须参数化,看上去似乎不需要进行关联什么。
该脚本在回放的时候也没报啥错 回放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)
Action.c(104): To location "http://192.168.89.99/timesheet/singleentry/index"
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Action.c(104): Registered web_reg_find successful for "Text=data_saved" (count=5)
Action.c(104): web_url("submit") was successful, 103595 body bytes, 804 header bytes, 14 chunking overhead bytes
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated. 但是db没有进行插入操作,除了哪里该关联的没有关联,我真的没方向去找了,
ps:session id是从cookie中拿到的,这个应该不用关联吧··而且···我都找不到能让我关联的地方--! :L 么人看么··自己先顶一下·· 这个提交步骤前,需要登录是么? 1、先检查业务,最好画出业务流程图,分析可能出问题的地方
2、插入成功后是否有信息提示,如有可加检查点判断;
3、手动分析是否需要关联。或者系统是否有唯一性要求 谢谢楼上两位提示,现在的问题大概是这样,提交这个操作是用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返回的数组内容抓不到···· 原帖由 qiguojie 于 2010-4-21 10:03 发表 http://bbs.51testing.com/images/common/back.gif
这个提交步骤前,需要登录是么?
这个是需要登录的,前面录制的登录脚本能够正确登录上去,登录后生成session_id保存在cookie里面
页:
[1]