06fbling 发表于 2012-3-7 11:36:03

手动关联时的错误

本帖最后由 06fbling 于 2012-3-7 11:43 编辑

环境是Loadrunner 11
运行的是loadrunner 自带的例子 web tours,按书上的实验了一下通不过,请各位大侠指点指点
要关联的函数


第一种关联的写法



Action.c(23): Error -27212: "Name" and/or "Value" missing before the "ENDITEM" argument (number 10)   
Action.c(23): Warning -26379: Pending web_reg_save_param/reg_find/create_html_param request(s) are deleted and will be handled as "not found"   
Action.c(23): Error -26377: No match found for the requested parameter "session". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 1024 bytes, use web_set_max_html_param_len to increase the parameter size   
Action.c(23): Error -26374: The above "not found" error(s) may be explained by header and body byte counts being 0 and 0, respectively.   
Action.c(23): web_submit_data("login.pl") highest severity level was "ERROR", 0 body bytes, 0 header bytes   


第二种关联写法

回放时:
Action.c(23): Error -26377: No match found for the requested parameter "session". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 1024 bytes, use web_set_max_html_param_len to increase the parameter size   
Action.c(23): web_submit_data("login.pl") highest severity level was "ERROR", 795 body bytes, 225 header bytes   

06fbling 发表于 2012-3-7 11:40:41

本帖最后由 06fbling 于 2012-3-7 11:45 编辑

月华 发表于 2012-3-7 11:42:07

LZ直接复制粘贴的代码把,Session这个参数没有被lr识别成参数

06fbling 发表于 2012-3-7 12:01:12

要关联的代码是
"Name=userSession", "Value=107818.350749291fftfQAzptVzzzzzHDDcHfptDif", ENDITEM,

第一次写的关联代码是
web_reg_save_param("session",
"LB=userSession Value=",
"RB=>",
"Ord=1",
"Search=Body",         
LAST);

"Name={session}", ENDITEM,

回放错误:
Action.c(23): Error -27212: "Name" and/or "Value" missing before the "ENDITEM" argument (number 10)   
Action.c(23): Warning -26379: Pending web_reg_save_param/reg_find/create_html_param request(s) are deleted and will be handled as "not found"   
Action.c(23): Error -26377: No match found for the requested parameter "session". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 1024 bytes, use web_set_max_html_param_len to increase the parameter size   
Action.c(23): Error -26374: The above "not found" error(s) may be explained by header and body byte counts being 0 and 0, respectively.   
Action.c(23): web_submit_data("login.pl") highest severity level was "ERROR", 0 body bytes, 0 header bytes   

第二次写的代码为
web_reg_save_param("session",
"LB=Name=userSession\",\"Value=",
"RB=>",
      "Ord=1",
"Search=Body",         
LAST);
"Name=userSession","Value={session}"

回放错误:
Action.c(16): Registering web_reg_save_param was successful   
Action.c(23): Error -26377: No match found for the requested parameter "session". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 1024 bytes, use web_set_max_html_param_len to increase the parameter size   
Action.c(23): web_submit_data("login.pl") highest severity level was "ERROR", 795 body bytes, 225 header bytes   


正确的写法应该是怎么样的?
还有那个右边界值RB=> 中的> 是什么意思呢?在脚本上不应该是 "


云层 发表于 2012-3-7 12:15:04

关联请写在刷新首页的请求前!!!!

06fbling 发表于 2012-3-7 17:14:00

我的
web_reg_save_param 是写在 web_submit_data 前的(web_submit_data 中有要关联的项)

我觉得是语法方面的问题,请那个大侠指教了,

云层 发表于 2012-3-7 17:26:41

再说一遍请把关联写在首页刷新前!!!!!

flying1943 发表于 2012-3-7 19:23:22

回复 6# 06fbling
你的web_reg_save_param()函数要写在产生session的语句前,而不是提交数据的语句前
也就是说web_reg_save_param()函数是保存它下方的服务器返回的值为某个参数的
建议lz了解一下reg函数的特点
区分一下web_find和web_reg_find就明白了

lilycheng1986 发表于 2012-3-21 10:34:41

右边界有误
应该是"RB=\""

cindyker 发表于 2012-3-21 17:36:51

:P

tansunyj 发表于 2012-3-21 22:16:51

左边界双引号需要转义!~~(userSession", "Value=)-------->(userSession\", \"Value=)

mimmy 发表于 2012-3-21 23:07:06

第一种关联方法错误,从源代码上看,左、右边界是要关联值的左边和右边,不能随意删掉双引号

lxh_xwj 发表于 2012-10-24 10:26:10

回复 1# 06fbling


    ,很明显第一个写法完全错误,你得把服务器返回的数据贴出来啊,这谁知道你的左右边界对不对。
页: [1]
查看完整版本: 手动关联时的错误