|
本人新手,用loadrunner11做自动关联时,无法自动关联,手动关联没有获取sessionid,不知从何处进行关联,请大侠们指教,谢谢!以下是我录制的脚本:
Action()
{
web_url("eInformation",
"URL=http://198.198.198.11:7001/eInformation/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_reg_save_param_ex(
"ParamName=Submitid",
"LB=Value=",
"RB="",
SEARCH_FILTERS,
LAST);
lr_start_transaction("login");
lr_think_time(14);
web_submit_form("login.shtml",
"Snapshot=t2.inf",
ITEMDATA,
"Name=userId", "Value=admin", ENDITEM,
"Name=userPwd", "Value=888888", ENDITEM,
"Name=Submit.x", "Value=51", ENDITEM,
"Name=Submit.y", "Value=8", ENDITEM,
EXTRARES,
"URL=images/theme/top.jpg", "Referer=http://198.198.198.11:7001/eInformation/pages/index/top.html", ENDITEM,
"URL=images/theme/top_but.gif", "Referer=http://198.198.198.11:7001/eInformation/pages/index/top.html", ENDITEM,
"URL=images/theme/left/home.gif", "Referer=http://198.198.198.11:7001/eInformation/pages/index/left.html", ENDITEM,
"URL=images/theme/left/report00.gif", "Referer=http://198.198.198.11:7001/eInformation/pages/index/left.html", ENDITEM,
"URL=images/theme/left/report.gif", "Referer=http://198.198.198.11:7001/eInformation/pages/index/left.html", ENDITEM,
"URL=assets/css/treeview/treeview-sprite.gif", "Referer=http://198.198.198.11:7001/eInformation/pages/index/left.html", ENDITEM,
"URL=images/theme_blue/bg1.jpg", "Referer=http://198.198.198.11:7001/eInformation//graphJC.shtml?action=main", ENDITEM,
"URL=charts/MSCombiDY2D.swf", "Referer=http://198.198.198.11:7001/eInformation//graphJC.shtml?action=main", ENDITEM,
"URL=charts/AngularGauge.swf", "Referer=http://198.198.198.11:7001/eInformation//graphJC.shtml?action=main", ENDITEM,
"URL=system/note.shtml?action=firstNotes", "Referer=http://198.198.198.11:7001/eInformation//graphJC.shtml?action=main", ENDITEM,
"URL=images/theme/button_bg.gif", "Referer=http://198.198.198.11:7001/eInformation//graphJC.shtml?action=main", ENDITEM,
"URL=images/theme/home.gif", "Referer=http://198.198.198.11:7001/eInformation//graphJC.shtml?action=main", ENDITEM,
"URL=images/theme/shticon.gif", "Referer=http://198.198.198.11:7001/eInformation//graphJC.shtml?action=main", ENDITEM,
"URL=images/theme/pt_new.gif", "Referer=http://198.198.198.11:7001/eInformation//graphJC.shtml?action=main", ENDITEM,
"URL=assets/css/treeview/treeview-loading.gif", "Referer=http://198.198.198.11:7001/eInformation//graphJC.shtml?action=main", ENDITEM,
"URL=images/theme/left/sep_but2.gif", "Referer=http://198.198.198.11:7001/eInformation/pages/index/sepline.html", ENDITEM,
LAST);
lr_end_transaction("login", LR_AUTO);
lr_start_transaction("chaxun");
lr_think_time(10);
web_url("A4020.shtml",
"URL=http://198.198.198.11:7001/eInformation/A4020.shtml?action=toQueryRpt&rptType=KJ&rptCyc=0&SM=500011",
"Resource=0",
"RecContentType=text/html",
"Referer=http://198.198.198.11:7001/eInformation/pages/index/left.html",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"URL=images/theme/money.gif", "Referer=http://198.198.198.11:7001/eInformation/A4020.shtml?action=toQueryRpt&rptType=KJ&rptCyc=0&SM=500011", ENDITEM,
"URL=images/theme/date.gif", "Referer=http://198.198.198.11:7001/eInformation/A4020.shtml?action=toQueryRpt&rptType=KJ&rptCyc=0&SM=500011", ENDITEM,
"URL=images/theme/datagridtitle.gif", "Referer=http://198.198.198.11:7001/eInformation/A4020.shtml?action=toQueryRpt&rptType=KJ&rptCyc=0&SM=500011", ENDITEM,
"URL=images/theme_blue/tab_buttom.gif", "Referer=http://198.198.198.11:7001/eInformation/A4020.shtml?action=toQueryRpt&rptType=KJ&rptCyc=0&SM=500011", ENDITEM,
"URL=images/theme/report.gif", "Referer=http://198.198.198.11:7001/eInformation/A4020.shtml?action=toQueryRpt&rptType=KJ&rptCyc=0&SM=500011", ENDITEM,
LAST);
web_submit_data("A4020.shtml_2",
"Action=http://198.198.198.11:7001/eInformation/A4020.shtml?action=queryRpt",
"Method=POST",
"RecContentType=text/html",
"Referer=http://198.198.198.11:7001/eInformation/A4020.shtml?action=toQueryRpt&rptType=KJ&rptCyc=0&SM=500011",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=rptType", "Value=KJ", ENDITEM,
"Name=rptCyc", "Value=0", ENDITEM,
"Name=SM", "Value=500011", ENDITEM,
"Name=orgNo", "Value=00000", ENDITEM,
"Name=orgName", "Value=00000", ENDITEM,
"Name=tempName", "Value=00000", ENDITEM,
"Name=param1", "Value=KJ01", ENDITEM,
"Name=param2", "Value=0", ENDITEM,
"Name=rpt", "Value=KJ01", ENDITEM,
"Name=ccy", "Value=01", ENDITEM,
"Name=cyc", "Value=0", ENDITEM,
"Name=year", "Value=", ENDITEM,
"Name=month", "Value=", ENDITEM,
"Name=xun", "Value=", ENDITEM,
"Name=sess", "Value=", ENDITEM,
"Name=halfY", "Value=", ENDITEM,
"Name=date", "Value=2012-06-30", ENDITEM,
"Name=qryUrl", "Value=/eInformation/A4020.shtml?action=toQueryRpt", ENDITEM,
"Name=location", "Value=当前位置:数据查询 >> 会计报表查询>> ", ENDITEM,
LAST);
lr_think_time(4);
web_submit_data("A4020.shtml_3",
"Action=http://198.198.198.11:7001/eInformation/A4020.shtml?action=toQueryRpt",
"Method=POST",
"RecContentType=text/html",
"Referer=http://198.198.198.11:7001/eInformation/A4020.shtml?action=queryRpt",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
"Name=rptType", "Value=KJ", ENDITEM,
"Name=rptCyc", "Value=0", ENDITEM,
"Name=SM", "Value=500011", ENDITEM,
"Name=orgNo", "Value=00000", ENDITEM,
"Name=tempName", "Value=00000", ENDITEM,
"Name=ccy", "Value=", ENDITEM,
"Name=cyc", "Value=", ENDITEM,
"Name=param2", "Value=0", ENDITEM,
"Name=year", "Value=", ENDITEM,
"Name=month", "Value=", ENDITEM,
"Name=xun", "Value=", ENDITEM,
"Name=sess", "Value=", ENDITEM,
"Name=halfY", "Value=", ENDITEM,
"Name=date", "Value=2012-06-30", ENDITEM,
LAST);
lr_end_transaction("chaxun", LR_AUTO);
return 0;
} |
|