51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 2030|回复: 3
打印 上一主题 下一主题

[求助] loadrunner性能测试中遇到的问题

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2019-8-7 18:01:21 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式
web_url("192.168.30.37:8082",
                "URL=http://192.168.30.37:8082/",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t52.inf",
                "Mode=HTML",
                LAST);
    //web_reg_save_param("id2","LB=Snapshot=","RB=\"","Search=Body",LAST);
        web_url("192.168.30.37:8082_2",
                "URL=http://192.168.30.37:8082/",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t53.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/44.js", ENDITEM,
                LAST);

        lr_think_time(16);

        web_url("favicon.ico",
                "URL=http://192.168.30.37:8082/favicon.ico",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t59.inf",
                "Mode=HTML",
                LAST);

        web_url("favicon.ico_2",
                "URL=http://192.168.30.37:8082/favicon.ico",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t60.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/sockjs-node/info?t=1565159582179", "Referer=http://192.168.30.37:8082/#/login", ENDITEM,
                LAST);

        web_custom_request("initCompleted",
                "URL=http://192.168.30.37:8082/api/bms/initialization/initCompleted",
                "Method=POST",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://192.168.30.37:8082/#/login",
                "Snapshot=t61.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        web_custom_request("initCompleted_2",
                "URL=http://192.168.30.37:8082/api/bms/initialization/initCompleted",
                "Method=POST",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://192.168.30.37:8082/#/login",
                "Snapshot=t62.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        web_url("websocket",
                "URL=http://192.168.30.37:8082/sockjs-node/985/x5xvrces/websocket",
                "Resource=0",
                "Referer=",
                "Snapshot=t63.inf",
                "Mode=HTML",
                LAST);

        lr_think_time(9);

        web_custom_request("loginSystem",
                "URL=http://192.168.30.37:8082/api/bms/login/loginSystem",
                "Method=POST",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://192.168.30.37:8082/#/login",
                "Snapshot=t64.inf",
                "Mode=HTML",
                "EncType=application/json;charset=utf-8",
                "Body={\"account\":\"admin\",\"ip\":\"192.168.0.111\",\"password\":\"admin_123456\"}",
                LAST);

        web_custom_request("loginSystem_2",
                "URL=http://192.168.30.37:8082/api/bms/login/loginSystem",
                "Method=POST",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://192.168.30.37:8082/#/login",
                "Snapshot=t65.inf",
                "Mode=HTML",
                "EncType=application/json;charset=utf-8",
                "Body={\"account\":\"admin\",\"ip\":\"192.168.0.111\",\"password\":\"admin_123456\"}",
                LAST);

        web_custom_request("getNoticeInfos",
                "URL=http://192.168.30.37:8082/api/bms/message/getNoticeInfos?secretCode=secrnum-user0001",
                "Method=POST",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://192.168.30.37:8082/#/login",
                "Snapshot=t66.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        web_custom_request("getNoticeInfos_2",
                "URL=http://192.168.30.37:8082/api/bms/message/getNoticeInfos?secretCode=secrnum-user0001",
                "Method=POST",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://192.168.30.37:8082/#/login",
                "Snapshot=t67.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        web_custom_request("countMessagesUnread",
                "URL=http://192.168.30.37:8082/api/bms/message/countMessagesUnread?secretCode=secrnum-user0001",
                "Method=POST",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://192.168.30.37:8082/#/login",
                "Snapshot=t68.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        web_custom_request("getTaskInfos",
                "URL=http://192.168.30.37:8082/api/bms/message/getTaskInfos?secretCode=secrnum-user0001",
                "Method=POST",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://192.168.30.37:8082/#/login",
                "Snapshot=t69.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        web_custom_request("countMessagesUnread_2",
                "URL=http://192.168.30.37:8082/api/bms/message/countMessagesUnread?secretCode=secrnum-user0001",
                "Method=POST",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://192.168.30.37:8082/#/login",
                "Snapshot=t70.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        web_custom_request("getTaskInfos_2",
                "URL=http://192.168.30.37:8082/api/bms/message/getTaskInfos?secretCode=secrnum-user0001",
                "Method=POST",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://192.168.30.37:8082/#/login",
                "Snapshot=t71.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        return 0;
}
在脚本中初步发现"Snapshot=t52.inf", 是动态变化的应该设置参数化,但这应该是客户端自动生成的不知道该如何参数化,还有录制中的web_url("websocket",
                "URL=http://192.168.30.37:8082/sockjs-node/985/x5xvrces/websocket",
                "Resource=0",
                "Referer=",
                "Snapshot=t63.inf",
                "Mode=HTML",
                LAST);

函数感觉很奇怪,每次运行到这都是提示错误,进行关联,加请求头都没有太好的效果。忘大佬解答,真的很急
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-5-11 05:16 , Processed in 0.067927 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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