小弟自学LR性能测试,遇到这个错误,不知道怎么解决,请各位大虾指导下
在回放脚本时出现的错误Action.c(33): Error -35061: No match found for the requested parameter "CorrelationParameter_1". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size
Action.c(33): Error -35061: No match found for the requested parameter "CorrelationParameter_2". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size
Action.c(33): Error -35061: No match found for the requested parameter "CorrelationParameter_3". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size
Action.c(33): web_url("WebTours") highest severity level was "ERROR", 312 body bytes, 164 header bytes
请各位大虾指导下,代码如下
Action()
{
//Correlation comment - Do not change!Original value='6618064' Name ='CorrelationParameter_1'
web_reg_save_param_ex(
"ParamName=CorrelationParameter_1",
"LB=107824.2",
"RB=f",
SEARCH_FILTERS,
"Scope=Body",
"RequestUrl=*/nav.pl*",
LAST);
//Correlation comment - Do not change!Original value='ApzQVzzzzH' Name ='CorrelationParameter_2'
web_reg_save_param_ex(
"ParamName=CorrelationParameter_2",
"LB=V",
"RB=D",
SEARCH_FILTERS,
"Scope=Body",
"RequestUrl=*/nav.pl*",
LAST);
//Correlation comment - Do not change!Original value='ztVf' Name ='CorrelationParameter_3'
web_reg_save_param_ex(
"ParamName=CorrelationParameter_3",
"LB=c",
"RB=>\n<table border",
SEARCH_FILTERS,
"Scope=Body",
"RequestUrl=*/nav.pl*",
LAST);
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=1",
"RecContentType=text/html",
"Referer=",
"Snapshot=t6.inf",
"Mode=HTML",
LAST);
lr_start_transaction("login");
lr_think_time(26);
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",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=107824.2{CorrelationParameter_1}fftzcV{CorrelationParameter_2}DDcHHpc{CorrelationParameter_3}", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
LAST);
web_submit_data("login.pl_2",
"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=t7.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=107824.2{CorrelationParameter_1}fftzcV{CorrelationParameter_2}DDcHHpc{CorrelationParameter_3}", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
"Name=login.x", "Value=67", ENDITEM,
"Name=login.y", "Value=16", ENDITEM,
LAST);
lr_end_transaction("login", LR_AUTO);
lr_start_transaction("clickFlights");
lr_think_time(39);
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t8.inf",
EXTRARES,
"URL=FormDateUpdate.class", ENDITEM,
"URL=CalSelect.class", ENDITEM,
LAST);
lr_end_transaction("clickFlights", LR_AUTO);
lr_start_transaction("findFlights");
lr_think_time(112);
web_submit_form("reservations.pl",
"Snapshot=t9.inf",
ITEMDATA,
"Name=depart", "Value=Denver", ENDITEM,
"Name=departDate", "Value=03/08/2012", ENDITEM,
"Name=arrive", "Value=London", ENDITEM,
"Name=returnDate", "Value=03/09/2012", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=roundtrip", "Value=<OFF>", ENDITEM,
"Name=seatPref", "Value=None", ENDITEM,
"Name=seatType", "Value=Coach", ENDITEM,
"Name=findFlights.x", "Value=28", ENDITEM,
"Name=findFlights.y", "Value=10", ENDITEM,
LAST);
lr_end_transaction("findFlights", LR_AUTO);
lr_start_transaction("chooseFlights");
lr_think_time(33);
web_submit_form("reservations.pl_2",
"Snapshot=t10.inf",
ITEMDATA,
"Name=outboundFlight", "Value=021;301;03/08/2012", ENDITEM,
"Name=reserveFlights.x", "Value=57", ENDITEM,
"Name=reserveFlights.y", "Value=11", ENDITEM,
LAST);
lr_end_transaction("chooseFlights", LR_AUTO);
lr_start_transaction("pay");
lr_think_time(83);
web_submit_form("reservations.pl_3",
"Snapshot=t11.inf",
ITEMDATA,
"Name=firstName", "Value=Joseph", ENDITEM,
"Name=lastName", "Value=Marshall", ENDITEM,
"Name=address1", "Value=234 Willow Drive", ENDITEM,
"Name=address2", "Value=San Jose/CA/94085", ENDITEM,
"Name=pass1", "Value=Joseph Marshall", ENDITEM,
"Name=creditCard", "Value=44551455224741474", ENDITEM,
"Name=expDate", "Value=06/14", ENDITEM,
"Name=saveCC", "Value=on", ENDITEM,
"Name=buyFlights.x", "Value=49", ENDITEM,
"Name=buyFlights.y", "Value=10", ENDITEM,
LAST);
lr_end_transaction("pay", LR_AUTO);
lr_start_transaction("signOff");
lr_think_time(33);
web_image("SignOff Button",
"Alt=SignOff Button",
"Ordinal=1",
"Snapshot=t12.inf",
LAST);
lr_end_transaction("signOff", LR_AUTO);
return 0;
} 错误的大致意思是:没有找到匹配的请求参数,检查请求的边界是否存在反应数据,此外,如果要保存的数据超过256 bytes,使用web_set_max_html_param_len增加参数长度。。
大概就是这个意思,应该是你定义的CorrelationParameter_1,CorrelationParameter_2,CorrelationParameter_3数据过多,它提示你使用那个函数增加参数长度。。
我也是初学者,只能解释到这了。。具体怎么解决还是得你慢慢试。。 可以用web_set_max_html_param_len增加参数长度,我试过到99999999共8位;还有,你可以在web_reg_save_param_ex(
"ParamName=CorrelationParameter_3",
"LB=c",
"RB=>\n<table border",
后面 加上 "NotFound=warning",保存编译下,就不回再提是错误了。
主要是自动关联造成的左右边界定位不精确,需要保存的值大 可以用web_set_max_html_param_len增加参数长度,我试过到99999999共8位;还有,你可以在web_reg_save_param_ex(
"ParamName=CorrelationParameter_3",
"LB=c",
"RB=>\n<table border",
后面 加上 "NotFound=warning",保存编译下,就不回再提是错误了。
主要是自动关联造成的左右边界定位不精确,需要保存的值大 纯小白表示看不懂,不过Loadruner我还是知道一点的,它是做性能测试的,但是如果出现了LZ这个情况,要自己code吗? 回复 3# ww7446844
"RB=/>/\n/<table border",
需要转义 不好意思 \转义符号搞错了
"RB=\>\\n\<table border", 应该是这样
你可以log打印出 你要找的部分 看是否正确 不需转义的吧,这个提示一般不是因为长度不够,大多时候是因为左右边界不对,或本身就没有匹配的内容
页:
[1]