51Testing软件测试论坛

标题: loadrun 左边界问题 [打印本页]

作者: mlvex123    时间: 2015-3-3 09:08
标题: loadrun 左边界问题
    代码如下:        lrs_send("socket1", "buf0", LrsLastArg);
    lrs_receive("socket1", "buf1", LrsLastArg);
    lrs_save_searched_string("socket1","buf1","NewParam","LB=Set-Cookie: JSESSIONID=","RB=; Path",1,0,-1);
   
    buf1中receive得到的信息如下:
    HTTP/1.1 200 OK\r\nServer: Apache-Coyote/1.1\r\nSet-Cookie: JSESSIONID=D10E85D2096F81901154A5B8039C97AE; Path=/njzjy\r\nContent-Type:
    ...省略
    action=\"/njzjy/systemlogin.do;jsessionid=D10E85D2096F81901154A5B8039C97AE?method=doLogin\"



   为什么在lrs_save_searched_string这里报错?
Action.c(13): fiCalcSearchedStringOffset: Left boundary occurs fewer times than ordinal
Action.c(13): Error : Unable to save to parameter lrs_save_searched_string :. Error code : 9015.
  左边界只有一处为Set-Cookie: JSESSIONID=的,而且我也指定了第一次出现的位置。



作者: mlvex123    时间: 2015-3-3 09:15
解决方法倒是找到了。
lrs_save_searched_string("socket1","buf1","NewParam","LB=Set-Cookie: JSESSIONID=","RB=; Path",1,0,-1);
修改为:
lrs_save_searched_string("socket1",LRS_LAST_RECEIVED,"NewParam","LB=Set-Cookie: JSESSIONID=","RB=; Path",1,0,-1);

但原因没找到。。




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