51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 3254|回复: 12
打印 上一主题 下一主题

[求助] 手动关联时的错误

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2012-3-7 11:36:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 06fbling 于 2012-3-7 11:43 编辑

环境是Loadrunner 11
运行的是loadrunner 自带的例子 web tours,按书上的实验了一下通不过,请各位大侠指点指点
要关联的函数


第一种关联的写法



Action.c(23): Error -27212: "Name" and/or "Value" missing before the "ENDITEM" argument (number 10)   [MsgId: MERR-27212]
Action.c(23): Warning -26379: Pending web_reg_save_param/reg_find/create_html_param[_ex] request(s) are deleted and will be handled as "not found"   [MsgId: MWAR-26379]
Action.c(23): Error -26377: No match found for the requested parameter "session". 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]
Action.c(23): Error -26374: The above "not found" error(s) may be explained by header and body byte counts being 0 and 0, respectively.   [MsgId: MERR-26374]
Action.c(23): web_submit_data("login.pl") highest severity level was "ERROR", 0 body bytes, 0 header bytes   [MsgId: MMSG-26388]



第二种关联写法

回放时:
Action.c(23): Error -26377: No match found for the requested parameter "session". 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]
Action.c(23): web_submit_data("login.pl") highest severity level was "ERROR", 795 body bytes, 225 header bytes   [MsgId: MMSG-26388]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?(注-册)加入51Testing

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2012-3-7 11:40:41 | 只看该作者
本帖最后由 06fbling 于 2012-3-7 11:45 编辑

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?(注-册)加入51Testing

x
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2012-3-7 11:42:07 | 只看该作者
LZ直接复制粘贴的代码把,Session这个参数没有被lr识别成参数
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2012-3-7 12:01:12 | 只看该作者
要关联的代码是
"Name=userSession", "Value=107818.350749291fftfQAzptVzzzzzHDDcHfptDif", ENDITEM,

第一次写的关联代码是
web_reg_save_param("session",
  "LB=userSession Value=",
  "RB=>",
  "Ord=1",
  "Search=Body",         
  LAST);

"Name={session}", ENDITEM,

回放错误:
Action.c(23): Error -27212: "Name" and/or "Value" missing before the "ENDITEM" argument (number 10)   [MsgId: MERR-27212]
Action.c(23): Warning -26379: Pending web_reg_save_param/reg_find/create_html_param[_ex] request(s) are deleted and will be handled as "not found"   [MsgId: MWAR-26379]
Action.c(23): Error -26377: No match found for the requested parameter "session". 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]
Action.c(23): Error -26374: The above "not found" error(s) may be explained by header and body byte counts being 0 and 0, respectively.   [MsgId: MERR-26374]
Action.c(23): web_submit_data("login.pl") highest severity level was "ERROR", 0 body bytes, 0 header bytes   [MsgId: MMSG-26388]


第二次写的代码为
web_reg_save_param("session",
  "LB=Name=userSession\",\"Value=",
  "RB=>",
        "Ord=1",
  "Search=Body",         
  LAST);

"Name=userSession","Value={session}"

回放错误:
Action.c(16): Registering web_reg_save_param was successful   [MsgId: MMSG-26390]
Action.c(23): Error -26377: No match found for the requested parameter "session". 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]
Action.c(23): web_submit_data("login.pl") highest severity level was "ERROR", 795 body bytes, 225 header bytes   [MsgId: MMSG-26388]



正确的写法应该是怎么样的?
还有那个右边界值RB=> 中的  > 是什么意思呢?在脚本上不应该是 "


回复 支持 反对

使用道具 举报

该用户从未签到

5#
发表于 2012-3-7 12:15:04 | 只看该作者
关联请写在刷新首页的请求前!!!!
回复 支持 反对

使用道具 举报

该用户从未签到

6#
 楼主| 发表于 2012-3-7 17:14:00 | 只看该作者
我的
web_reg_save_param 是写在 web_submit_data 前的(web_submit_data 中有要关联的项)

我觉得是语法方面的问题,请那个大侠指教了,
回复 支持 反对

使用道具 举报

该用户从未签到

7#
发表于 2012-3-7 17:26:41 | 只看该作者
再说一遍请把关联写在首页刷新前!!!!!
回复 支持 反对

使用道具 举报

该用户从未签到

8#
发表于 2012-3-7 19:23:22 | 只看该作者
回复 6# 06fbling
你的web_reg_save_param()函数要写在产生session的语句前,而不是提交数据的语句前
也就是说web_reg_save_param()函数是保存它下方的服务器返回的值为某个参数的
建议lz了解一下reg函数的特点
区分一下web_find和web_reg_find就明白了
回复 支持 反对

使用道具 举报

该用户从未签到

9#
发表于 2012-3-21 10:34:41 | 只看该作者
右边界有误
应该是"RB=\""
回复 支持 反对

使用道具 举报

  • TA的每日心情
    开心
    2018-1-21 15:46
  • 签到天数: 3 天

    连续签到: 1 天

    [LV.2]测试排长

    10#
    发表于 2012-3-21 17:36:51 | 只看该作者
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    11#
    发表于 2012-3-21 22:16:51 | 只看该作者
    左边界双引号需要转义!~~(userSession", "Value=)-------->(userSession\", \"Value=)
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    12#
    发表于 2012-3-21 23:07:06 | 只看该作者
    第一种关联方法错误,从源代码上看,左、右边界是要关联值的左边和右边,不能随意删掉双引号
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    13#
    发表于 2012-10-24 10:26:10 | 只看该作者
    回复 1# 06fbling


        ,很明显第一个写法完全错误,你得把服务器返回的数据贴出来啊,这谁知道你的左右边界对不对。
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-9-23 16:22 , Processed in 0.075756 second(s), 28 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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