TA的每日心情 | 开心 2017-6-16 10:33 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
最近练习的时候发现,loadrunner录制的脚本中第一个请求服务器返回的cookie能够自动加到下一个请求header中,形式是:JESSIONID=AJHDSJASJSJASJKSKAJ231JHHJ123的形式,但是脚本中我没有添加关于cookie的函数操作,为什么loadrunner能够自动实现这个。我不是很明白 有懂的大神能否帮忙解答一下。
第二点不明白的地方是,loadrunner本质是以什么方式在模拟浏览器发送请求?
下面是录制的登录功能的脚本:
Action()
{
web_url("userLoginController.do",
"URL=http://192.168.3.140:8080/ele_con/userLoginController.do?login",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"URL=http://www.bing.com/favicon.ico", ENDITEM,
"URL=../favicon.ico", ENDITEM,
"URL=webpage/buss/elecon/common/images/loading.gif", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
LAST);
web_submit_data("userLoginController.do_2",
"Action=http://192.168.3.140:8080/ele_con/userLoginController.do?checkuser",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=userName", "Value=wuqingyun725", ENDITEM,
"Name=password", "Value=Wu_123456", ENDITEM,
"Name=keyid", "Value=", ENDITEM,
"Name=flag", "Value=1", ENDITEM,
LAST);
web_url("userLoginController.do_3",
"URL=http://192.168.3.140:8080/ele_con/userLoginController.do?login",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"URL=upload/plug-in/accordion/images/create.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/sign.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/con_withdraw.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/con_new.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=webpage/buss/elecon/common/images/right_arrow.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/con_track.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/con_back.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/complete.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/abort.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/account.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/relieve.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/sign_name.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/package.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/collect.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/down_center.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/tmp_center.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=webpage/buss/elecon/common/images/icon_1.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=webpage/buss/elecon/common/images/con_create.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=webpage/buss/elecon/common/images/con_sign.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=webpage/buss/elecon/common/images/con_down.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=webpage/buss/elecon/common/images/con_suspen.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=webpage/buss/elecon/common/images/con_valid.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=webpage/buss/elecon/common/images/con_relieve.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=upload/plug-in/accordion/images/mai_list.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=webpage/buss/elecon/common/images/per_temp_s.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=webpage/buss/elecon/common/images/collec.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=plug-in/jquery-ui/images/ui-icons_444444_256x240.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=webpage/buss/elecon/common/images/comp_temp_s.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
"URL=webpage/buss/elecon/common/images/botm_arrow.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
LAST);
web_url("userLoginController.do_4",
"URL=http://192.168.3.140:8080/ele_con/userLoginController.do?refreshMenuContractNum&_=1497498472690",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login",
"Snapshot=t4.inf",
"Mode=HTML",
EXTRARES,
"URL=plug-in/jquery-ui/images/ui-icons_777777_256x240.png", "Referer=http://192.168.3.140:8080/ele_con/userLoginController.do?login", ENDITEM,
LAST);
return 0;
}
|
|