51Testing软件测试论坛

标题: Loadrunner关联的错误,请大家帮忙看看,在线等待 [打印本页]

作者: zhangxulanyou    时间: 2011-1-11 16:45
标题: Loadrunner关联的错误,请大家帮忙看看,在线等待
一,脚本部分
web_reg_save_param("code","LB=Name=","RB=Box2","search=Body",LAST);

        web_submit_form("Default.aspx",
                "Snapshot=t2.inf",
                ITEMDATA,
                "Name=T_userid", "Value=dongql", ENDITEM,
                "Name=T_pwd", "Value=123456", ENDITEM,
                "Name=TextBox2", "Value={code}", ENDITEM,
                "Name=TextBox3", "Value=", ENDITEM,
                "Name=tbVer", "Value=", ENDITEM,
                "Name=Submit.x", "Value=35", ENDITEM,
                "Name=Submit.y", "Value=5", ENDITEM,
                LAST);
二、replay日志部分
Action.c(17): Error -26377: No match found for the requested parameter "code". 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]
Action.c(17): Notify: Saving Parameter "code = "
Action.c(17): web_submit_form("Default.aspx") highest severity level was "ERROR", 10254 body bytes, 552 header bytes          [MsgId: MMSG-26388]
Ending action Action.
Ending iteration 1.
作者: 森林一木    时间: 2011-1-11 16:48
出现这个错误的原因,90%是位置放错了。你能不能把详细代码贴点出来
作者: zhangxulanyou    时间: 2011-1-11 17:19
Action()
{

        web_url("oa.szlanyou.com",
                "URL=http://oa.szlanyou.com/",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                LAST);

        lr_think_time(3);

web_reg_save_param("code","LB=Name=","RB=Box2","search=Body",LAST);

        web_submit_form("Default.aspx",
                "Snapshot=t2.inf",
                ITEMDATA,
                "Name=T_userid", "Value=dongql", ENDITEM,
                "Name=T_pwd", "Value=123456", ENDITEM,
                "Name=TextBox2", "Value={code}", ENDITEM,
                "Name=TextBox3", "Value=", ENDITEM,
                "Name=tbVer", "Value=", ENDITEM,
                "Name=Submit.x", "Value=35", ENDITEM,
                "Name=Submit.y", "Value=5", ENDITEM,
                LAST);

lr_output_message("校验码:",lr_eval_string("{code}"));

        web_url("main.aspx",
                "URL=http://oa.szlanyou.com/main.aspx",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t3.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/webctrl_client/1_0/treeview.htc", "Referer=", ENDITEM,
                "Url=/image/1.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
                "Url=/image/7.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
                "Url=/image/2.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
                "Url=/image/3.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
                "Url=/image/4.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
                "Url=/image/5.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
                "Url=/image/6.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
                "Url=/image/k1_02.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
                "Url=/image/k1_01.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
                "Url=/image/k1_03.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
                "Url=/image/k1_04.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
                "Url=/image/k1_05.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
                LAST);

        return 0;
}
这是全部的代码了
作者: PrefTest    时间: 2011-1-11 21:10
校验码是在访问http://oa.szlanyou.com/的时候返回的吗?

改成这样试试:

Action()
{

web_reg_save_param("code","LB=Name=","RB=Box2","search=Body",LAST);

        web_url("oa.szlanyou.com",
                "URL=http://oa.szlanyou.com/",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                LAST);

        lr_think_time(3);

        web_submit_form("Default.aspx",
                "Snapshot=t2.inf",
                ITEMDATA,
                "Name=T_userid", "Value=dongql", ENDITEM,
                "Name=T_pwd", "Value=123456", ENDITEM,
                "Name=TextBox2", "Value={code}", ENDITEM,
                "Name=TextBox3", "Value=", ENDITEM,
                "Name=tbVer", "Value=", ENDITEM,
                "Name=Submit.x", "Value=35", ENDITEM,
                "Name=Submit.y", "Value=5", ENDITEM,
                LAST);

lr_output_message("校验码:",lr_eval_string("{code}"));

        web_url("main.aspx",
                "URL=http://oa.szlanyou.com/main.aspx",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t3.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/webctrl_client/1_0/treeview.htc", "Referer=", ENDITEM,
                "Url=/image/1.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
                "Url=/image/7.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
                "Url=/image/2.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
                "Url=/image/3.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
                "Url=/image/4.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
                "Url=/image/5.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
                "Url=/image/6.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
                "Url=/image/k1_02.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
                "Url=/image/k1_01.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
                "Url=/image/k1_03.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
                "Url=/image/k1_04.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
                "Url=/image/k1_05.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
                LAST);

        return 0;
}
作者: msnshow    时间: 2011-1-11 21:16
很明显是放错位置了
作者: zhangxulanyou    时间: 2011-1-12 10:24
校验码是在访问http://oa.szlanyou.com的时候产生的,我试了PrefTest的方法,但是仍然报错,错误如下,请大家帮忙来看看:

Action.c(5): Error -26377: No match found for the requested parameter "code". 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]
Action.c(5): Notify: Saving Parameter "code = "
Action.c(5): web_url("oa.szlanyou.com") highest severity level was "ERROR", 117279 body bytes, 4526 header bytes          [MsgId: MMSG-26388]




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