LoadRunner保存服务器返回的JSESSIONID而不是html

时间:2013-01-17 12:15:39

标签: loadrunner

我手动关联的常用方法是设置lef和右边界,因为我在初始网页的html中找到它。 但是,在LoadRunner中使用扩展日志记录,我看到JSESSIONID是以这种方式从服务器返回的:

Action.c(4): Redirecting "http://xxx/xxx/" (redirection depth is 1)      [MsgId: MMSG-26694]

Action.c(4): To location "http://xxx/xxx/xxx/xxx"        [MsgId: MMSG-26693]

Action.c(4): t=3707ms: 384-byte response headers for "http://xxx/xxx/xxx/xxx" (RelFrameId=1,     Internal ID=3)

Action.c(4):     HTTP/1.1 302 Moved Temporarily\r\n

Action.c(4):     Server: Apache-Coyote/1.1\r\n

Action.c(4):     Set-Cookie: JSESSIONID=b6A10tdvDpwexLDVS4VKGHEX; Path=/xxx\r\n

Action.c(4):     Date: Thu, 17 Jan 2013 12:04:38 GMT\r\n

Action.c(4):     Expires: Thu, 01 Jan 1970 00:00:00 GMT\r\n

Action.c(4):     Pragma: no-cache\r\n

Action.c(4):     Cache-Control: no-cache, no-store\r\n

Action.c(4):     Location: http://xxx/xxx/xxx/xxx;jsessionid=b6A10td

Action.c(4):     vDpwexLDVS4VKGHEX?0\r\n

Action.c(4):     Content-Length: 0\r\n

Action.c(4):     \r\n

Action.c(4): Redirecting

如何捕获此值?因为它不在从服务器返回的HTML中吗?

BR 马格努斯

1 个答案:

答案 0 :(得分:2)

好的,解决了它使用了这个:

web_reg_save_param("JSessionID", "LB=JSESSIONID=", "RB=;", LAST);