51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 3848|回复: 5
打印 上一主题 下一主题

[原创] 如果Sessionid 不出现在脚本中,关联取不到值?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-1-27 18:42:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Sessionid 不出现在脚本中, 可以在
Generation log 查询到!这种情况不可以做关联?
如果处理呢?谢谢!
==
//1 define "Testform" to get the value of TestForm
web_reg_save_param("TestForm",
                "LB=TestFORM=",
                "RB=;",
                "Ord=1",
                "RelFrameId=1",
                "Search=Headers",
                "IgnoreRedirections=Yes",
               LAST);
              
//2. define "sessionid" to get the value of sessionid
    web_reg_save_param("sessionid",
                "LB=ASP.NET_SessionId=",
                "RB=;",
                "Ord=1",
                "RelFrameId=1",
                "Search=Headers",
                "IgnoreRedirections=Yes",
               LAST);
              
// 脚本中只录制到
web_add_cookie("TestFORM={TestForm}; DOMAIN=192.168.0.1");
=====================

/// Replay log:

Action.c(33): Error -26377: No match found for the requested parameter "TestForm". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size          [MsgId: MERR-26377]
Action.c(33): Notify: Saving Parameter "TestForm = "
Action.c(33): Error -26377: No match found for the requested parameter "sessionid". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size          [MsgId: MERR-26377]
Action.c(33): Notify: Saving Parameter "sessionid = "

/// Generation log:

***** Request Header For Transaction With Id 75 ******
GET /Testtest/images/Menu/payment.gif HTTP/1.1
Accept: */*
Referer: http://192.168.0.1/Testtest/home.aspx
Accept-Language: zh-cn
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; CIBA; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Host: 192.168.0.1
Connection: Keep-Alive
Cookie: TestFORM=2E14725C557DD95FE2F0C5DF99B4CB8AA9EEA6DDAF7799724A95E6761E214E5776EB28147778B1D1A59951C53E8A7F4F8AD78EF10ECC16CBBC96AB56C3FA88BD; ASP.NET_SessionId=etxx4n45b31nda45ywhinimz; Testuser=1; Testuserpwd=1

[ 本帖最后由 fessor21 于 2010-1-27 18:44 编辑 ]
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2010-1-27 19:55:51 | 只看该作者
这个sessionid是在cookie里面的?不过只要服务器返回都能抓到,也许你没找对地方而已
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2010-1-27 20:08:49 | 只看该作者
只能从 replay 或者 generation log 中找到这个session id. 录制脚本并没有出现。只录制到这一句:

web_add_cookie("TestFORM=2E14725C557DD95FE2F0C5DF99B4CB8AA9EEA6DDAF7799724A95E6761E214E5776EB28147778B1D1A59951C53E8A7F4F8AD78EF10ECC16CBBC96AB56C3FA88BD; DOMAIN=192.168.0.1");
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2010-1-27 22:01:36 | 只看该作者
是的,好像只出现在cookie. DoNet 这样处理的?
回复 支持 反对

使用道具 举报

该用户从未签到

5#
 楼主| 发表于 2010-1-28 10:31:55 | 只看该作者
改用URL方式录制脚本,response data 能找到一处sessionid,但运行后仍然找不到,各位这个问题有解吗?


==== A.脚本
//1. 设置关联
web_reg_save_param("sessionid",
                "LB=Set-Cookie: ASP.NET_SessionId=",
                "RB=; path",
        "Ord=1",
        "Search=Headers",
         LAST);
         
//2. 脚本中能录制到的,只有下面这一句
web_add_cookie("testFORM=4E3D99BD7A83A47E4F67CBE989DEA24D533F563BFEBE70560CB7E3CD4C1A008CC827AF2EA9ABDD0F2333A6EA9EEEFCEF164C26CDC49A484A02BC0A76A04B30A5; DOMAIN=192.168.1.20");
=== .脚本

== B. Replay Log:
vuser_init.c(23): Error -26377: No match found for the requested parameter "sessionid". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size          [MsgId: MERR-26377]


== C. generation log
****** Request Header For Transaction With Id 47 ******
GET /testtest/ValidateUser/Login.aspx HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */*
Accept-Language: zh-cn
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; CIBA; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Host: 192.168.1.20
Connection: Keep-Alive
Cookie: testFORM=4E3D99BD7A83A47E4F67CBE989DEA24D533F563BFEBE70560CB7E3CD4C1A008CC827AF2EA9ABDD0F2333A6EA9EEEFCEF164C26CDC49A484A02BC0A76A04B30A5


$$$$$$ Request Header For Transaction With Id 47 Ended $$$$$$

****** Response Header For Transaction With Id 47 ******
HTTP/1.1 200 OK
Date: Thu, 28 Jan 2010 01:18:25 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: ASP.NET_SessionId=puyt0n55ahot3i55jhqpfn45; path=/; HttpOnly
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 7107

===generation log
回复 支持 反对

使用道具 举报

  • TA的每日心情
    郁闷
    2015-6-16 14:29
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    6#
    发表于 2010-1-28 11:37:25 | 只看该作者
    你在tree视图下的server response 中找找。
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-5-10 22:15 , Processed in 0.069779 second(s), 23 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表