51Testing软件测试论坛

标题: 请教:录制完脚本 回放出现 错误-26612 的问题 谢谢! [打印本页]

作者: jerryaaa    时间: 2010-11-3 09:57
标题: 请教:录制完脚本 回放出现 错误-26612 的问题 谢谢!
Web服务器用的是resin

单协议的web(http/html)我都试过了,都会产生同样的问题;
还有在录制选项中,我把自动关联去掉了,系统还会产生关联;
基于url和基于html都试过了;

我用的lr是8.1版本的,用web/winsocket双协议录制的,录制的脚本如下
Action()
{
    lr_think_time(8);
    web_submit_data("logincheck.jsp",
  "Action=http://192.168.18.217:888/zh/sys/logincheck.jsp",
  "Method=POST",
  "RecContentType=text/html",
  "Referer=http://192.168.18.217:888/zh/Login.jsp",
  "Snapshot=t3.inf",
  "Mode=HTML",
  ITEMDATA,
  "Name=user_id", "Value=201012602", ENDITEM,
  "Name=user_pass", "Value=123", ENDITEM,
  "Name=selectPart", "Value=on", ENDITEM,
  "Name=selectedPart", "Value=student", ENDITEM,
  LAST);
    lr_think_time( 12 );
    web_url("StudentSysSelect.jsp",
  "URL=http://192.168.18.217:888/zh/sys/StudentSysSelect.jsp",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=",
  "Snapshot=t4.inf",
  "Mode=HTML",
  LAST);
    web_image("student3PL.jpg",
  "Src=../images/student3PL.jpg",
  "MapName=map",
  "AreaOrdinal=1",
  "Snapshot=t5.inf",
  LAST);
    web_url("main_frame.jsp",
  "URL=http://192.168.18.217:888/zh/sys/main_frame.jsp",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=",
  "Snapshot=t6.inf",
  "Mode=HTML",
  EXTRARES,
  "Url=../myapp/icons/object/minus.gif", "Referer=http://192.168.18.217:888/zh/sys/dynamic_menu.jsp", ENDITEM,
  LAST);
    web_url("top_query.htm",
  "URL=http://192.168.18.217:888/zh/sys/top_query.htm",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=http://192.168.18.217:888/zh/sys/main_frame.jsp",
  "Snapshot=t7.inf",
  "Mode=HTML",
  LAST);
    web_url("Style.htc",
  "URL=http://192.168.18.217:888/zh/Style/Style.htc",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=",
  "Snapshot=t8.inf",
  "Mode=HTML",
  LAST);
    web_url("Style.htc_2",
  "URL=http://192.168.18.217:888/zh/Style/Style.htc",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=",
  "Snapshot=t9.inf",
  "Mode=HTML",
  LAST);
    web_url("ns_warehouse_customer_list.jsp",
  "URL=http://192.168.18.217:888/zh/customer/ns_warehouse_customer_list.jsp",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=http://192.168.18.217:888/zh/sys/dynamic_menu.jsp",
  "Snapshot=t10.inf",
  "Mode=HTML",
  EXTRARES,
  "Url=../myapp/images/list_bg.gif", ENDITEM,
  "Url=../myapp/images/btnSmartX.gif", ENDITEM,
  LAST);
    web_url("ns_warehouse_customer_edit.jsp",
  "URL=http://192.168.18.217:888/zh/customer/ns_warehouse_customer_edit.jsp",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=http://192.168.18.217:888/zh/sys/main_frame.jsp",
  "Snapshot=t11.inf",
  "Mode=HTML",
  LAST);
    lr_think_time( 10 );
    web_submit_data("ns_warehouse_customer_edit.jsp_2",
  "Action=http://192.168.18.217:888/zh/customer/ns_warehouse_customer_edit.jsp?op=editsubmit",
  "Method=POST",
  "RecContentType=text/html",
  "Referer=http://192.168.18.217:888/zh/customer/ns_warehouse_customer_edit.jsp",
  "Snapshot=t12.inf",
  "Mode=HTML",
  ITEMDATA,
  "Name=customer_id", "Value=C101102050", ENDITEM,
  "Name=customer_name", "Value=cangchu hous", ENDITEM,
  "Name=customer_sname", "Value=", ENDITEM,
  "Name=linkman", "Value=", ENDITEM,
  "Name=linkduty", "Value=", ENDITEM,
  "Name=linkphone", "Value=", ENDITEM,
  "Name=linkmobile", "Value=", ENDITEM,
  "Name=linkfax", "Value=", ENDITEM,
  "Name=linkemail", "Value=", ENDITEM,
  "Name=vocation_property", "Value=", ENDITEM,
  "Name=vocation_mode", "Value=", ENDITEM,
  "Name=constitute_date", "Value=", ENDITEM,
  "Name=operator_mode", "Value=", ENDITEM,
  "Name=web", "Value=", ENDITEM,
  "Name=comments", "Value=", ENDITEM,
  "Name=alarm_flag", "Value=0", ENDITEM,
  "Name=alarm_value", "Value=", ENDITEM,
  "Name=customer_pwd", "Value=", ENDITEM,
  "Name=free_stack", "Value=", ENDITEM,
  "Name=opr_dep_name", "Value=05-", ENDITEM,
  "Name=c_type", "Value=?", ENDITEM,
  "Name=record_id", "Value=0", ENDITEM,
  LAST);
    web_url("ns_warehouse_customer_list.jsp_2",
  "URL=http://192.168.18.217:888/zh/customer/ns_warehouse_customer_list.jsp",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=http://192.168.18.217:888/zh/sys/main_frame.jsp",
  "Snapshot=t13.inf",
  "Mode=HTML",
  EXTRARES,
  "Url=../myapp/images/list_bg.gif", ENDITEM,
  "Url=../myapp/images/btnSmartX.gif", ENDITEM,
  "Url=../myapp/images/remove.gif", ENDITEM,
  LAST);
    return 0;
}

回放脚本时,出现下面的错误:
Action.c(138): 错误 -26612: 对于“http://192.168.18.217:888/zh/cus ... t.jsp?op=editsubmit”,HTTP 状态代码=500 (Internal Server Error)   [MsgId: MERR-26612]
Action.c(138): web_submit_data("ns_warehouse_customer_edit.jsp_2") 最高严重级别为“ERROR”,2015 个正文字节,194 个标头字节,13 个成块开销字节   [MsgId: MMSG-26387]
作者: skyzhu    时间: 2010-11-3 10:43
可能是录制有写参数没识别出来,导致再提交时,提交了错误的信息,服务器处理报错了
比如  "Name=c_type", "Value=?", ENDITEM,    那个问号是什么?
LR这东西,需要对协议比较了解,否则出错一定不知道什么问题
winsocket协议没必要加进去
作者: jerryaaa    时间: 2010-11-3 11:48
谢谢!
c_type是客户类型的意思,有仓储客户、运输客户等,左边菜单有仓储客户、运输客户,点击了仓储客户这个菜单,就进入了仓储客户增删改查的页面
作者: xieyang702    时间: 2010-11-3 22:56
恩,看像是参数的问题,有没可能是Hidden字段的问题呢?
作者: jerryaaa    时间: 2010-11-4 20:09
有Hidden字段,但隐藏字段在脚本中都有(都录制出来了)
作者: luxiuxiu1987    时间: 2011-6-23 16:03
楼主解决了么?同样的问题,现在比较觉得可能是hidden字段,但是要怎么判断问题呢?
作者: wzero_ouyang    时间: 2012-10-10 17:28
我也遇到了,是参数化的问题。




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2