51Testing软件测试论坛

标题: loadrunner录制的脚步回放报26628错误该怎么解决? [打印本页]

作者: 随落叶飘散    时间: 2016-8-16 13:19
标题: loadrunner录制的脚步回放报26628错误该怎么解决?
Action.c(14): 警告 -26628: 对于“http://192.168.0.191/user/”,HTTP 状态代码=403 (Forbidden)          [MsgId: MWAR-26628]

作者: 随落叶飘散    时间: 2016-8-16 13:32
这个是录制的脚本
Action()
{

        web_url("192.168.0.191",
                "URL=http://192.168.0.191/",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                LAST);

        web_url("login",
                "URL=http://192.168.0.191/user/login",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.0.191/index.html",
                "Snapshot=t2.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../css/theme/default/img/index/foot_bg.jpg", ENDITEM,
                "Url=../css/theme/default/img/index/bg.gif", ENDITEM,
                "Url=../css/theme/default/img/index/icon.png", ENDITEM,
                "Url=../js/gallery/jquery/jquery/1.10.2/jquery.js", ENDITEM,
                "Url=../js/gallery/swfupload/swfupload.js", ENDITEM,
                "Url=../favicon.ico", "Referer=", ENDITEM,
                "Url=../js/gallery/i18n/jquery.i18n.properties-1.0.9.js?v=pangu-20160811172555", ENDITEM,
                "Url=../js/gallery/jquery/cookie/1.3.1/jquery.cookie.js?v=pangu-20160811172555", ENDITEM,
                "Url=../js/lenovodata/signin.js?v=pangu-20160811172555", ENDITEM,
                "Url=../js/lenovodata/component/sLanguageBox.js?v=pangu-20160811172555", ENDITEM,
                "Url=../js/lenovodata/util.js?v=pangu-20160811172555", ENDITEM,
                "Url=../js/gallery/mustache/0.7.2/mustache.js?v=pangu-20160811172555", ENDITEM,
                "Url=../js/lenovodata/SDK/UserManager.js?v=pangu-20160811172555", ENDITEM,
                "Url=../js/gallery/jquery/placeholder/2.0.7/jquery.placeholder.js?v=pangu-20160811172555", ENDITEM,
                "Url=../resource/i18n/strings.properties?_=1471316135213", ENDITEM,
                "Url=../resource/i18n/strings_zh.properties?_=1471316135214", ENDITEM,
                "Url=../js/lenovodata/component/tips.js?v=pangu-20160811172555", ENDITEM,
                "Url=../js/lenovodata/component/wait.js?v=pangu-20160811172555", ENDITEM,
                "Url=../js/lenovodata/component/alertDialog.js?v=pangu-20160811172555", ENDITEM,
                "Url=../js/lenovodata/component/eventTarget.js?v=pangu-20160811172555", ENDITEM,
                "Url=../js/lenovodata/component/dialog.js?v=pangu-20160811172555", ENDITEM,
                LAST);

        lr_think_time(10);

        lr_rendezvous("denglu");
        lr_start_transaction("denglu");

        web_submit_data("login_2",
                "Action=http://192.168.0.191/v2/user/login?account_id=-1&uid=-1",
                "Method=POST",
                "TargetFrame=",
                "RecContentType=application/json",
                "Referer=http://192.168.0.191/user/login",
                "Snapshot=t4.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=user_slug", "Value=y2", ENDITEM,
                "Name=password", "Value=123456", ENDITEM,
                "Name=captcha", "Value=", ENDITEM,
                LAST);

        web_add_cookie("isReminded=true; DOMAIN=192.168.0.191");

        web_url("login_3",
                "URL=http://192.168.0.191/user/login",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.0.191/user/login",
                "Snapshot=t5.inf",
                "Mode=HTML",
                EXTRARES,
               
                "Url=../v2/notice/pull?limit=500&offset=0&_=1471316238923&account_id=1&uid=4", "Referer=http://192.168.0.191/", ENDITEM,
                "Url=../js/lenovodata/component/authCombox.js?v=pangu-20160811172555", "Referer=http://192.168.0.191/", ENDITEM,
                "Url=../v2/user/info/get/", "Referer=http://192.168.0.191/", ENDITEM,
       
                "Url=../img/loading3.gif", "Referer=http://192.168.0.191/", ENDITEM,
                "Url=../v2/user/info/get/4?_=1471316239344&account_id=1&uid=4", "Referer=http://192.168.0.191/", ENDITEM,
                "Url=../v2/region/get?_=1471316239302&account_id=1&uid=4", "Referer=http://192.168.0.191/", ENDITEM,
                "Url=../v2/metadata/databox/?path_type=ent&include_deleted=false&offset=0&sort=asc&orderby=mtime&_=1471316239367&account_id=1&uid=4", "Referer=http://192.168.0.191/", ENDITEM,
                "Url=../v2/user/info/get/4?_=1471316239521&account_id=1&uid=4", "Referer=http://192.168.0.191/", ENDITEM,
                "Url=../js/module/Upload/img/dialog_operate.png", "Referer=http://192.168.0.191/", ENDITEM,
                "Url=../v2/metadata/databox/?path_type=ent&include_deleted=false&limit=50&offset=0&sort=asc&orderby=mtime&_=1471316239486&account_id=1&uid=4", "Referer=http://192.168.0.191/", ENDITEM,
                "Url=../v2/metadata/databox/?path_type=ent&include_deleted=false&offset=0&sort=asc&orderby=mtime&content_type=dir&_=1471316239539&account_id=1&uid=4", "Referer=http://192.168.0.191/", ENDITEM,
                "Url=../css/theme/default/img/icon-file@20x20.png", "Referer=http://192.168.0.191/", ENDITEM,
                "Url=../v2/metadata/databox/?path_type=ent&include_deleted=false&limit=50&offset=0&sort=asc&orderby=mtime&_=1471316239658&account_id=1&uid=4", "Referer=http://192.168.0.191/", ENDITEM,
                "Url=../css/theme/default/img/icon-file@25x25.png", "Referer=http://192.168.0.191/", ENDITEM,
                "Url=../css/theme/default/img/icon_calendar.png", "Referer=http://192.168.0.191/", ENDITEM,
                LAST);

        web_url("SWFDialog.html",
                "URL=http://192.168.0.191/js/module/Upload/SWFDialog.html?1471316239362",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.0.191/",
                "Snapshot=t6.inf",
                "Mode=HTML",
                LAST);
        lr_end_transaction("denglu", LR_AUTO);

        return 0;
}


作者: 天之秦    时间: 2016-8-16 14:46
服务器返回的是403错误,应该是没有带服务器需要的验证信息导致的。建议抓包看下request都会带什么信息来对比下自己脚本的错误。
作者: seagull1985    时间: 2016-8-17 09:04
三楼正确。。
作者: 随落叶飘散    时间: 2016-8-17 10:23
天之秦 发表于 2016-8-16 14:46
服务器返回的是403错误,应该是没有带服务器需要的验证信息导致的。建议抓包看下request都会带什么信息来对 ...

但是我改成URL模式录制就没有错了   只有HTML格式录制才会报错
作者: 随落叶飘散    时间: 2016-8-17 10:24
seagull1985 发表于 2016-8-17 09:04
三楼正确。。

看的懵懵懂懂,请求太多,不知道该怎么对应查找
作者: 随落叶飘散    时间: 2016-8-18 10:18
天之秦 发表于 2016-8-16 14:46
服务器返回的是403错误,应该是没有带服务器需要的验证信息导致的。建议抓包看下request都会带什么信息来对 ...

你看这request 回放提示成功了

作者: Yonina51    时间: 2018-5-15 09:28
you can open the Runtime Settings (F4) and tip the option Internet Protocol -> Preferences -> HTTP -> Mark HTTP errors as warnings.SETTING YES




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2