loadrunner-2-7设置关联
学习这一节遇到如下情况,大致分为三种情况
- 找不到userSession
- 手动关联和自动关联
发现在学习这一节课的时候,录制的脚步并没有出现视屏所讲解的userSession这个字段,经过在网页上查找,发现原来是因为录制的脚本类型不同而导致的
在Recording Options下这个菜单,分为两个类型:Html和Url
webtours的例子-选择URL类型ACTION,重点关注web_submit_data
Action() { web_submit_data("login.pl", "Action=http://127.0.0.1:1080/WebTours/login.pl", "Method=POST", "RecContentType=text/html", "Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home", "Snapshot=t16.inf", "Mode=HTTP", ITEMDATA, "Name=userSession", "Value=121037.576832726zccfiHApDfiDDDDDDHDffpcccVf", ENDITEM, "Name=username", "Value=jojo", ENDITEM, "Name=password", "Value=bean", ENDITEM, "Name=JSFormSubmit", "Value=off", ENDITEM, "Name=login.x", "Value=43", ENDITEM, "Name=login.y", "Value=7", ENDITEM, LAST); }
webtours的例子-选择html类型ACTION,重点关注web_submit_form()
{ web_submit_form("login.pl", "Snapshot=t27.inf", ITEMDATA, "Name=username", "Value=jojo", ENDITEM, "Name=password", "Value=bean", ENDITEM, "Name=login.x", "Value=34", ENDITEM, "Name=login.y", "Value=6", ENDITEM, LAST); }
有两种关联方法:手动关联和自动关联(recording options--correlation)
在学习这一小节的时候,在没关联的情况下,也回放成功,不知道什么原因