51Testing软件测试论坛
标题:
loadrunner 录制脚本后回访 报错问题
[打印本页]
作者:
xuyinru
时间:
2010-10-20 11:21
标题:
loadrunner 录制脚本后回访 报错问题
登陆界面用户登陆的时候系统会验证该登陆用户是否正在使用系统 如果正在使用就提示该用户正在使用 再次点击登陆按钮 可以强行登陆
用loadrunner录制了脚本以后会回放的时候会提示失败
Action()
{
web_url("IPBearNet",
"URL=http://192.168.70.237:9080/IPBearNet",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_url("login.do",
"URL=http://192.168.70.237:9080/IPBearNet/login.do?method=valSoftInfo",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
EXTRARES,
"Url=styles/style_sc/images/login/r2_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=valSoftInfo", ENDITEM,
"Url=styles/style_sc/images/login/r1_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=valSoftInfo", ENDITEM,
"Url=styles/style_sc/images/login/btn_login.gif", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=valSoftInfo", ENDITEM,
"Url=styles/style_sc/images/login/r2_c2.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=valSoftInfo", ENDITEM,
"Url=styles/style_sc/images/login/r3_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=valSoftInfo", ENDITEM,
"Url=styles/style_sc/images/logo_zone-01.gif", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=valSoftInfo", ENDITEM,
LAST);
lr_think_time( 2 );
web_submit_form("login.do_2",
"Snapshot=t3.inf",
ITEMDATA,
"Name=loginName", "Value=xu", ENDITEM,
"Name=loginPwd", "Value=12", ENDITEM,
EXTRARES,
"Url=styles/style_sc/images/login/r2_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=Login", ENDITEM,
"Url=styles/style_sc/images/login/r1_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=Login", ENDITEM,
"Url=styles/style_sc/images/login/r2_c2.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=Login", ENDITEM,
"Url=styles/style_sc/images/login/btn_login.gif", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=Login", ENDITEM,
"Url=styles/style_sc/images/login/r3_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=Login", ENDITEM,
"Url=styles/style_sc/images/logo_zone-01.gif", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=Login", ENDITEM,
LAST);
web_submit_form("login.do_3",
"Snapshot=t4.inf",
ITEMDATA,
"Name=loginName", "Value=xu", ENDITEM,
"Name=loginPwd", "Value=12", ENDITEM,
LAST);
web_url("index.jsp",
"URL=http://192.168.70.237:9080/IPBearNet/index.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"Url=styles/style_sc/images/studio/lineleft/r3_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/lineleft.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/lineright/r3_c4.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/lineright.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/linetop/r2_c3.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/linetop.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/linetop/r2_c2.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/linetop.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/linemiddle/r3_c3.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/linemiddle.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/linebottom/r4_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/linebottom.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/linebottom/r4_c2.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/linebottom.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/linebottom/r4_c3.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/linebottom.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/linetop/r2_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/linetop.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/navtop/r1_c2.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/navtop.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/navtop/r1_c1_zone.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/navtop.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/navtop/r1_c3.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/navtop.jsp", ENDITEM,
"Url=styles/style_sc/images/navtopmenu/toprivetmenu.gif", "Referer=http://192.168.70.237:9080/IPBearNet/studio/navtop.jsp", ENDITEM,
LAST);
web_link("犚? 表 盘",
"Text=犚? 表 盘",
"Snapshot=t6.inf",
EXTRARES,
"Url=../styles/style_sc/images/navleft/bg_navleft.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/ibn/studio.do?method=LoadNavLeft&CRMId=111&menuPid=111&menuName=仪 表 盘", ENDITEM,
"Url=../styles/style_sc/images/navleft/r1_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/ibn/studio.do?method=LoadNavLeft&CRMId=111&menuPid=111&menuName=仪 表 盘", ENDITEM,
"Url=../styles/style_sc/images/navleft/r1_c1-arrow.gif", "Referer=http://192.168.70.237:9080/IPBearNet/ibn/studio.do?method=LoadNavLeft&CRMId=111&menuPid=111&menuName=仪 表 盘", ENDITEM,
"Url=../styles/style_sc/images/navleft/r2_openadown.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/ibn/studio.do?method=LoadNavLeft&CRMId=111&menuPid=111&menuName=仪 表 盘", ENDITEM,
LAST);
在回放的过程中 如果已有人员登陆 脚本可以直接通过
如果没有人登陆 脚本提示
Action.c(47): Error -27979: Requested form not found [MsgId: MERR-27979]
Action.c(47): web_submit_form("login.do_3") highest severity level was "ERROR", 0 body bytes, 0 header bytes [MsgId: MMSG-26388]
求脚本改进办法
作者:
PrefTest
时间:
2010-10-20 14:27
在脚本中加入判断,检查登录后页面是否跳转到登录成功的页面,还是跳到提示已经登录的页面
作者:
xuyinru
时间:
2010-10-20 14:49
谢谢 是不是能通过web_reg_find判断是否登录成功
作者:
mx113040
时间:
2010-10-20 15:13
没有看到你登录的脚本呀?
作者:
cdhw_ly
时间:
2010-10-21 16:16
LZ录制脚本内容是 用户已经登录系统,给予提示后又再提交,强登录上去?
回放时如果没有使用系统,应该直接登录成功,login.do_3应该就不会去执行吧
我猜测的...
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2