51Testing软件测试论坛
标题:
这是关联的问题吗?
[打印本页]
作者:
farnear
时间:
2006-3-9 13:34
标题:
这是关联的问题吗?
录制一段登录脚本,在录制选项-关联中选择在脚本中自动建立关联,脚本如下
#include "as_web.h"
Action()
{
web_set_max_html_param_len("1024");
web_url("login.aspx",
"URL=http://localhost/bms/login.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=images/login_message_back.gif", ENDITEM,
"Url=images/hline.gif", ENDITEM,
LAST);
/* Registering parameter(s) from source task id 15
// {Siebel_Analytic_ViewState3} = "dDwyMDIyOTgwODAyOzs+9dZASwN2xnttMrh5wlXhK3xRXFE="
// */
web_reg_save_param("
Siebel_Analytic_ViewState3
",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1.1",
LAST);
web_submit_form("login.aspx_2",
"Snapshot=t2.inf",
ITEMDATA,
"Name=tbname", "Value={cc}", ENDITEM,
"Name=tbpassword", "Value={dd}", ENDITEM
,
"Name=btlogin", "Value=登 陆", ENDITEM,
EXTRARES,
"Url=resource/style.css", "Referer=http://localhost/bms/default.htm", ENDITEM,
"Url=../webctrl_client/1_0/treeview.htc", "Referer=", ENDITEM,
"Url=../webctrl_client/1_0/treeimages/F.gif", "Referer=http://localhost/bms/power.aspx", ENDITEM,
"Url=../webctrl_client/1_0/treeimages/Tplus.gif", "Referer=http://localhost/bms/power.aspx", ENDITEM,
"Url=../webctrl_client/1_0/treeimages/Lplus.gif", "Referer=http://localhost/bms/power.aspx", ENDITEM,
LAST);
web_submit_data("top.aspx",
"Action=http://localhost/bms/top.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost/bms/top.aspx",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=__EVENTTARGET", "Value=lbtlogout", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value={
Siebel_Analytic_ViewState3
}", ENDITEM,
LAST);
web_url("login.aspx_3",
"URL=http://localhost/bms/login.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTML",
EXTRARES,
"Url=images/login_message_back.gif", ENDITEM,
"Url=images/hline.gif", ENDITEM,
LAST);
return 0;
}
其中对用户名进行了参数化,提示出错
Action.c(31): 错误 -27190: 找不到请求的参数“Siebel_Analytic_ViewState3”的匹配项。检查请求的边界是否存在于响应数据中。此外,如果要保存的数据超过 1024 个字节,请使用 web_set_max_html_param_len 增加参数大小 [MsgId: MERR-27190]
结束自动日志消息堆栈。
时什么原因?关联的问题吗?
作者:
今天有雾
时间:
2006-3-13 14:29
提示不是说了,你没有找到匹配项,这个可能你没有找到你要关联的内容,恐怕你把关联放错位置了,
作者:
Koffer
时间:
2006-3-13 14:44
如果这个关联是LoadRunner自动产生的,应该不会有什么错误!
试试看 web_set_max_html_param_len("900000");
可能ViewState会很大!
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2