51Testing软件测试论坛

标题: 关于飞机订票的关联,求教!!! [打印本页]

作者: 鹭岛    时间: 2008-9-17 16:02
标题: 关于飞机订票的关联,求教!!!
LR自带的飞机订票,录制完毕后如下:

1.如果选择不同的城市,则飞机票的班号,价格等就不一样!

因此要建立关联!
我建立关联的句子如下:
web_reg_save_param("value1","LB=outboundFlight=","RB=%",LAST);
web_reg_save_param("value2","LB=%3B","RB=%3B09%2F18%2F2008&returnFlight",LAST);
web_reg_save_param("value3","LB=returnFlight=","RB=%",LAST);
web_reg_save_param("value4","LB=%3B","RB=%3B09%2F19%2F2008&numPa",LAST);

需要做关联的是:  VALUE1,VALUE2.等等已经代替掉了!
"Name=outboundFlight", "Value=261;757;09/18/2008", ENDITEM,    /*这个地方我使用value1代替261,value2代替757,下面的已经替换了!
"Name=returnFlight", "Value={value3};{value4};09/19/2008", ENDITEM,

tree里面看到的代码是:
"outboundFlight=261%3B757%3B09%2F18%2F2008&returnFlight=621%3B757%3B09%2F19%2F2008&numPas

这个是显示来回的机票价格信息,我已经参数化了城市,所以当城市变化的时候,这个也要变化,所以想使用参数!请教如何使用呢?我这样运行会出错!
作者: 鹭岛    时间: 2008-9-17 16:02
错误提示是:

flight.c(58): Error -26377: No match found for the requested parameter "value1". 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          [MsgId: MERR-26377]
flight.c(58): Error -26377: No match found for the requested parameter "value2". 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          [MsgId: MERR-26377]
flight.c(58): Error -26377: No match found for the requested parameter "value3". 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          [MsgId: MERR-26377]
flight.c(58): Error -26377: No match found for the requested parameter "value4". 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          [MsgId: MERR-26377]
flight.c(58): web_submit_form("reservations.pl") highest severity level was "ERROR", 3414 body bytes, 253 header bytes          [MsgId: MMSG-26388]
Ending action flight.
作者: saharaqs    时间: 2008-9-17 16:11
是不是关联的句子放的位置不对啊
作者: 鹭岛    时间: 2008-9-17 16:18
不会的,应该不会错的,前后都检查了,是那句需要关联的
作者: saharaqs    时间: 2008-9-17 16:53
写错了,编辑掉

[ 本帖最后由 saharaqs 于 2008-9-17 16:56 编辑 ]
作者: topor    时间: 2008-12-10 15:58
LZ,结果怎么样?
作者: lht821008    时间: 2009-3-20 17:24
这个并非都需要关联,参化数后,利用参数化的取值策略也一样能够完成,不用这么复杂的。
要想检验参数化,也不难,你检查一下录制的脚本中,关联参数位置左右项值是否准确,还有就是同时把关联变量使用:
lr_out_message(lr_eval_string("关联变量"));
这样打出来看看是不是取到值,如果没有就是你前面本身就有问题。

[ 本帖最后由 lht821008 于 2009-3-20 17:25 编辑 ]
作者: zhang_yajin    时间: 2009-3-20 21:37
打开你的LOG,看看所关联的值取到的是什么
检查你的左右边界是不是有错,该转义的是不是转义了
你的关联是不是放在了页面提交之前

其他的。。。我再想想




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2