51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

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

[求助] loadrunner怎么把response的值 作为下面脚本的数据

[复制链接]
  • TA的每日心情
    开心
    2018-11-9 10:37
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    跳转到指定楼层
    1#
    发表于 2018-9-26 15:48:38 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    本帖最后由 测试时代 于 2018-9-26 17:59 编辑

      脚本中   web_url("project-create.html",
            "URL=http://192.168.100.157:7777/ranzhi/proj/project-create.html",
            "TargetFrame=",
            "Resource=0",
            "RecContentType=text/html",
            "Referer=http://192.168.100.157:7777/ranzhi/sys/index.html",
            "Snapshot=t28.inf",
            "Mode=HTML",
            EXTRARES,
            "Url=../js/datetimepicker/css/min.css?v=4.8", ENDITEM,
            "Url=../js/datetimepicker/js/min.js?v=4.8", ENDITEM,
            "Url=../js/kindeditor/kindeditor.min.css", ENDITEM,
            "Url=../theme/zui/css/min.css", ENDITEM,
            "Url=../js/kindeditor/themes/default/default.png", ENDITEM,
            LAST);
    返回的response中
    <div class='row page-content with-menu'>
    <script language='Javascript'>v.jsRoot = "\/ranzhi\/js\/";</script>
    <script language='Javascript'>v.themeRoot = "\/ranzhi\/theme\/";</script>
    <script language='Javascript'>v.editors = {"id":["desc"],"tools":"simple"};</script>
    <script language='Javascript'>v.errorUnwritable = "\u4e0a\u4f20\u76ee\u5f55\u4e0d\u53ef\u5199\uff0c\u65e0\u6cd5\u4e0a\u4f20\u9644\u4ef6\u3002";</script>
    <script language='Javascript'>v.editorLang = "zh_CN";</script>
    <script src='/ranzhi/js/kindeditor/kindeditor.min.js?v=4.8' type='text/javascript'></script>
    <script src='/ranzhi/js/kindeditor/lang/zh_CN.js?v=4.8' type='text/javascript'></script>
    <script language='Javascript'>v.uid = "5ba4b3877fdfa";</script>

    其中v.uid = "5ba4b3877fdfa"; 需要作为后面的脚本应用
    目前我自己研究的方案使用函数 但是是不对的
         web_reg_save_param("uid2",
            "LB=v.uid =",
            "RB=;</script>",
               LAST);改方法运行的错误日志 Action.c(372): Error -26377: No match found for the requested parameter "uid2". 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]
    不知道大家有什么方法???


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

    使用道具 举报

  • TA的每日心情
    奋斗
    3 天前
  • 签到天数: 1389 天

    连续签到: 3 天

    [LV.10]测试总司令

    2#
    发表于 2018-9-26 17:30:16 | 只看该作者
    你的方法是对的,注意左右边界需要加上引号,只取中间的值。
    如果不对,把错误信息发来看看。
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2018-11-9 10:37
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    3#
     楼主| 发表于 2018-9-26 18:00:10 | 只看该作者
    qqq911 发表于 2018-9-26 17:30
    你的方法是对的,注意左右边界需要加上引号,只取中间的值。
    如果不对,把错误信息发来看看。

    这是错误日志  Action.c(372): Error -26377: No match found for the requested parameter "uid2".
    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]  此方法需要进行requnest请求去取值
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    3 天前
  • 签到天数: 1389 天

    连续签到: 3 天

    [LV.10]测试总司令

    4#
    发表于 2018-9-26 19:14:17 | 只看该作者
    1.先去看你reply的时候,这个页面的返回信息,我估计你还是没登录,导致这个页面没有返回该有的内容。
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    3 天前
  • 签到天数: 1389 天

    连续签到: 3 天

    [LV.10]测试总司令

    5#
    发表于 2018-9-26 19:15:19 | 只看该作者
    2.返回页面长度是否很长,可以用web_set_max_html_param_len   来设置下。
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-5-3 23:17 , Processed in 0.071996 second(s), 24 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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