请问loadrunner为啥录制脚本里面没有cookie也没有token
Action(){
lr_start_transaction("登录");
web_reg_find("Text=4931.com-鏈\x80涓撲笟鏈\x80浼樻儬鐨勭綉缁滄父鎴忎氦鏄撳钩鍙帮紙鎵嬫父,娓告垙璐﹀彿,娓告垙甯\x81,瑁呭,鐐瑰崱鍏呭\x80\xBC,婵\x80娲荤爜锛\x89",
LAST);
lr_think_time(3);
web_url("login.html",
"URL=http://192.168.102.200:8081/web/html/login.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.102.200:8081/web/index.html",
"Snapshot=t2.inf",
"Mode=HTML",
EXTRARES,
"Url=../js/jquery.min.js?t=201706051810", ENDITEM,
"Url=../js/common/common.js?t=201706051810", ENDITEM,
"Url=../js/layer/layer.js?t=201706051810", ENDITEM,
"Url=../js/footer.js?t=201706051810", ENDITEM,
"Url=../css/footer.css?t=201706051810", ENDITEM,
"Url=../js/common/jquery.cookie.js?t=201706051810", ENDITEM,
"Url=../js/login.js?t=201706051810", ENDITEM,
"Url=../img/dlzc_01.png", ENDITEM,
"Url=../img/dlzc.png", ENDITEM,
"Url=../js/common/jquery.md5.js?t=201706051810", ENDITEM,
"Url=img/fanhui.png", ENDITEM,
LAST);
web_add_auto_header("Accept",
"application/json, text/javascript, */*; q=0.01");
web_add_auto_header("Cache-Control",
"no-cache");
web_add_auto_header("Pragma",
"no-cache");
web_add_auto_header("X-Requested-With",
"XMLHttpRequest");
web_submit_data("mgt_listGame",
"Action=http://192.168.102.200:8081/web/mgt_game/mgt_listGame",
"Method=POST",
"RecContentType=application/json",
"Referer=http://192.168.102.200:8081/web/index.html",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=game_initial", "Value=Z", ENDITEM,
"Name=uuid", "Value=web", ENDITEM,
LAST);
web_submit_data("mgt_listGame_2",
"Action=http://192.168.102.200:8081/web/mgt_game/mgt_listGame",
"Method=POST",
"RecContentType=application/json",
"Referer=http://192.168.102.200:8081/web/index.html",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=game_initial", "Value=Y", ENDITEM,
"Name=uuid", "Value=web", ENDITEM,
LAST);
web_submit_data("mgt_listGame_3",
"Action=http://192.168.102.200:8081/web/mgt_game/mgt_listGame",
"Method=POST",
"RecContentType=application/json",
"Referer=http://192.168.102.200:8081/web/index.html",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
"Name=game_initial", "Value=X", ENDITEM,
"Name=uuid", "Value=web", ENDITEM,
LAST);
web_submit_data("mgt_listGame_4",
"Action=http://192.168.102.200:8081/web/mgt_game/mgt_listGame",
"Method=POST",
"RecContentType=application/json",
"Referer=http://192.168.102.200:8081/web/index.html",
"Snapshot=t6.inf",
"Mode=HTML",
ITEMDATA,
"Name=game_initial", "Value=W", ENDITEM,
"Name=uuid", "Value=web", ENDITEM,
LAST);
web_revert_auto_header("Cache-Control");
web_revert_auto_header("Pragma");
web_revert_auto_header("X-Requested-With");
web_add_auto_header("Cache-Control",
"no-cache");
web_add_auto_header("Pragma",
"no-cache");
web_add_auto_header("X-Requested-With",
"XMLHttpRequest");
web_submit_data("mgt_listGame_5",
"Action=http://192.168.102.200:8081/web/mgt_game/mgt_listGame",
"Method=POST",
"RecContentType=application/json",
"Referer=http://192.168.102.200:8081/web/index.html",
"Snapshot=t7.inf",
"Mode=HTML",
ITEMDATA,
"Name=game_initial", "Value=U", ENDITEM,
"Name=uuid", "Value=web", ENDITEM,
LAST);
web_submit_data("mgt_listGame_6",
"Action=http://192.168.102.200:8081/web/mgt_game/mgt_listGame",
"Method=POST",
"RecContentType=application/json",
"Referer=http://192.168.102.200:8081/web/index.html",
"Snapshot=t8.inf",
"Mode=HTML",
ITEMDATA,
"Name=game_initial", "Value=V", ENDITEM,
"Name=uuid", "Value=web", ENDITEM,
EXTRARES,
"Url=../img/dlzc_qq.png", "Referer=http://192.168.102.200:8081/web/css/login.css?t=201706051810", ENDITEM,
"Url=../img/denglu.png", "Referer=http://192.168.102.200:8081/web/css/login.css?t=201706051810", ENDITEM,
LAST);
web_revert_auto_header("Cache-Control");
web_revert_auto_header("Pragma");
web_revert_auto_header("X-Requested-With");
web_add_auto_header("Accept",
"image/png,image/*;q=0.8,*/*;q=0.5");
web_url("getImg",
"URL=http://192.168.102.200:8081/web/code/getImg?t=1498791546469",
"Resource=0",
"Referer=http://192.168.102.200:8081/web/html/login.html",
"Snapshot=t9.inf",
"Mode=HTML",
LAST);
lr_rendezvous("登录");
web_add_auto_header("Accept",
"application/json, text/javascript, */*; q=0.01");
web_add_header("Cache-Control",
"no-cache");
web_add_header("Pragma",
"no-cache");
web_add_header("X-Requested-With",
"XMLHttpRequest");
lr_think_time(159);
web_submit_data("login",
"Action=http://192.168.102.200:8081/web/member/login",
"Method=POST",
"RecContentType=application/json",
"Referer=http://192.168.102.200:8081/web/html/login.html",
"Snapshot=t10.inf",
"Mode=HTML",
ITEMDATA,
"Name=memberName", "Value={NewParam}", ENDITEM,
"Name=password", "Value={NewParam}", ENDITEM,
"Name=vcode", "Value=5zhc", ENDITEM,
"Name=uuid", "Value=web", ENDITEM,
LAST);
web_add_auto_header("Accept",
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
web_url("index.html_2",
"URL=http://192.168.102.200:8081/web/index.html",
"Resource=0",
"Referer=http://192.168.102.200:8081/web/html/login.html",
"Mode=HTML",
EXTRARES,
"Url=css/reset.css?t=201706051810", ENDITEM,
"Url=css/index.css?t=201706061540", ENDITEM,
"Url=css/header.css?t=201706051810", ENDITEM,
"Url=css/top-wrapper.css?t=201706051810", ENDITEM,
"Url=css/navigation.css?t=201706051810", ENDITEM,
"Url=css/footer.css?t=201706051810", ENDITEM,
"Url=css/idangerous.swiper2.7.6.css?t=201706051810", ENDITEM,
"Url=js/jquery.min.js?t=201706051810", ENDITEM,
"Url=js/common/common.js?t=201706051810", ENDITEM,
"Url=js/layer/layer.js?t=201706051810", ENDITEM,
"Url=css/help.css?t=201706051810", ENDITEM,
"Url=js/index.js?t=201706051810", ENDITEM,
"Url=js/index_dk.js?t=201706051810", ENDITEM,
"Url=js/index_header.js?t=201706051810", ENDITEM,
"Url=js/top-wrapper-index.js?t=201706051810", ENDITEM,
"Url=js/idangerous.swiper2.7.6.min.js?t=201706051810", ENDITEM,
"Url=js/common/jquery.cookie.js?t=201706051810", ENDITEM,
LAST);
web_add_auto_header("Accept",
"application/json, text/javascript, */*; q=0.01");
web_add_auto_header("Cache-Control",
"no-cache");
web_add_auto_header("Pragma",
"no-cache");
web_add_auto_header("X-Requested-With",
"XMLHttpRequest");
web_submit_data("getFhsmsCount",
"Action=http://192.168.102.200:8081/web/message/auth/getFhsmsCount",
"Method=POST",
"RecContentType=application/json",
"Referer=http://192.168.102.200:8081/web/index.html",
"Snapshot=t11.inf",
"Mode=HTML",
ITEMDATA,
"Name=uuid", "Value=web", ENDITEM,
LAST);
lr_end_transaction("登录",LR_AUTO);
return 0;
}
record headers not in list 里面也没有Csrf-Token有选项 这跟你录制脚本的模式有关。不过没有cookie和token不会影响到脚本的实用。 疯癫子 发表于 2017-7-4 08:10
这跟你录制脚本的模式有关。不过没有cookie和token不会影响到脚本的实用。
你好,没有录制到token的话,脚本跑起来后台一直在提示token为空,jmeter我自己加了token就可以了,但是loadrunner不会加,请问录制设置具体要改哪里才有cookie和token呢? 你看一下录制脚本时的设置:图片在下面。 有用!谢谢了! 疯癫子 发表于 2017-7-5 09:15
你看一下录制脚本时的设置:图片在下面。
根据你的设置修改,录制还是没有,可能我是火狐浏览器录制的,我准备下loadrunner12来试试了,谢谢你 疯癫子 发表于 2017-7-5 09:15
你看一下录制脚本时的设置:图片在下面。
换了最新的12.54,还是没有cookie,但是试着用360浏览器录制的时候,能录制到360广告的cookie,说明不是软件问题,也说明了360浏览器坑爹,哈哈。ie11录制没有cookie就没有了,就是后台跑起来一堆token为空,头疼 一般少用某某0 的东西乱改东西。 我用loadrunner11,ie9来录制是有的,要不你试试? 我用loadrunner11,ie9来录制是有的,要不你试试? 没事121 发表于 2017-7-10 11:37
我用loadrunner11,ie9来录制是有的,要不你试试?
win7的,不好降到9了
页:
[1]