51Testing软件测试论坛

标题: 新人求助JSESSIONID问题。 [打印本页]

作者: OpenTest    时间: 2009-8-31 11:44
标题: 新人求助JSESSIONID问题。
看过不少这个问题的帖子,可是很遗憾最终也没有能看到有回复已经解决的楼主。希望各位大大给予帮助啊。
场景:LR测试简单web系统登录。
情况:脚本只要迭代2次或2次以上就会出现获取不到 JSESSIONID的情况。
报错信息:ogIn.c(19): Error -26377: No match found for the requested parameter "JSESSIONID2". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 1024 bytes, use web_set_max_html_param_len to increase the parameter size   [MsgId: MERR-26377]
LogIn.c(19): web_url("metaldb") highest severity level was "ERROR", 331680 body bytes, 1509 header bytes, 397 chunking overhead bytes   [MsgId: MMSG-26387]
具体登录脚本:
LogIn()
{
web_set_max_html_param_len("1024");
/* Registering parameter(s) from source task id 6
// {JSESSIONID2} = "2FFAB7246D7DE6776DE20C64541BEAD9"
// */
web_reg_save_param("JSESSIONID2",
  "LB/IC=jsessionid=",
  "RB/IC=\"",
  "Ord=1",
  "Search=body",
  "RelFrameId=1",
  LAST);
    lr_output_message("the response is: %s", lr_eval_string("{JSESSIONID2}"));
web_url("metaldb",
  "URL=http://192.168.67.58:8084/metaldb/",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=",
  "Snapshot=t1.inf",
  "Mode=HTML",
  EXTRARES,
  "Url=images/index_pic02.gif", ENDITEM,
  "Url=images/index_bg01.gif", ENDITEM,
  LAST);
web_submit_data("login.action;jsessionid=2FFAB7246D7DE6776DE20C64541BEAD9",
  "Action=http://192.168.67.58:8084/metaldb/login/login.action;jsessionid={JSESSIONID2}",
  "Method=POST",
  "RecContentType=text/html",
  "Referer=http://192.168.67.58:8084/metaldb/",
  "Snapshot=t5.inf",
  "Mode=HTML",
  ITEMDATA,
  "Name=userName", "Value={Login}", ENDITEM,
  "Name=password", "Value=123456", ENDITEM,
  EXTRARES,
  "Url=../images/top_duble01.gif", "Referer=http://192.168.67.58:8084/metaldb/top.jsp", ENDITEM,
  "Url=../common/css/images/white_sign.gif", "Referer=http://192.168.67.58:8084/metaldb/top.jsp", ENDITEM,
  "Url=../common/css/images/green_sign.gif", "Referer=http://192.168.67.58:8084/metaldb/top.jsp", ENDITEM,
  "Url=../img/main_bg_2.gif", "Referer=http://192.168.67.58:8084/metaldb/leftjsclsj.jsp", ENDITEM,
  "Url=../common/css/images/left_bottombg.gif", "Referer=http://192.168.67.58:8084/metaldb/leftjsclsj.jsp", ENDITEM,
  "Url=../images/img/base.gif", "Referer=http://192.168.67.58:8084/metaldb/leftjsclsj.jsp", ENDITEM,
  "Url=../images/img/joinbottom.gif", "Referer=http://192.168.67.58:8084/metaldb/leftjsclsj.jsp", ENDITEM,
  "Url=../images/img/page.gif", "Referer=http://192.168.67.58:8084/metaldb/leftjsclsj.jsp", ENDITEM,
  "Url=../struts/dojo/src/debug.js", "Referer=http://192.168.67.58:8084/metaldb/jsclsj/jsclsjcljbxxlist.action", ENDITEM,
  "Url=../struts/dojo/src/browser_debug.js", "Referer=http://192.168.67.58:8084/metaldb/jsclsj/jsclsjcljbxxlist.action", ENDITEM,
  "Url=../img/Loader.gif", "Referer=http://192.168.67.58:8084/metaldb/jsclsj/jsclsjcljbxxlist.action", ENDITEM,
  "Url=../img/main_bg_3.gif", "Referer=http://192.168.67.58:8084/metaldb/jsclsj/jsclsjcljbxxlist.action", ENDITEM,
  "Url=../images/main02_sign01.gif", "Referer=http://192.168.67.58:8084/metaldb/jsclsj/jsclsjcljbxxlist.action", ENDITEM,
  "Url=../images/buttonbg.gif", "Referer=http://192.168.67.58:8084/metaldb/jsclsj/jsclsjcljbxxlist.action", ENDITEM,
  "Url=../images/main02_button.gif", "Referer=http://192.168.67.58:8084/metaldb/jsclsj/jsclsjcljbxxlist.action", ENDITEM,
  "Url=../img/jiantou-ermao.ani", "Referer=http://192.168.67.58:8084/metaldb/jsclsj/jsclsjcljbxxlist.action", ENDITEM,
  "Url=../images/main02_button02.gif", "Referer=http://192.168.67.58:8084/metaldb/jsclsj/jsclsjcljbxxlist.action", ENDITEM,
  LAST);
  return 0;
}




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