LoadRunner自動關聯

有時候我們需要的參數在頁面跳轉返回後的URL中,這時我們需要通過自動關聯來獲取該參數。
腳本錄製完以後,切換到【Tree視圖】,左側選擇要關聯的函數塊,右側上方切到【HTTP View】視圖,在右側下方【Response】中獲取訂單號,鼠標選中參數然後右鍵【Create Correlation】
LoadRunner自動關聯


//Correlation comment - Do not change!Original value='1003795' Name ='CorrelationParameter_1'

web_reg_save_param_ex(
"ParamName=CorrelationParameter_1",
"LB=SysNo=",
"RB=\r\nServer: Microsoft-IIS",
SEARCH_FILTERS,
"Scope=All",
"RequestUrl=*/SODetail.aspx*",
LAST);

....

lr_output_message("http://10.24.68.7:8020/Sale/SODetail.aspx?SysNo=%s", lr_eval_string("{CorrelationParameter_1}"));

web_submit_data("SODetail.aspx_7",
"Action=http://10.24.68.7:8020/Sale/SODetail.aspx?SysNo={CorrelationParameter_1}",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.24.68.7:8020/Sale/SODetail.aspx?SysNo={CorrelationParameter_1}",
"Snapshot=t80.inf",
"Mode=HTTP",
ITEMDATA,
.....
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章