51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2711|回复: 4
打印 上一主题 下一主题

[原创] loadrunner 录制脚本后回访 报错问题

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-10-20 11:21:52 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
登陆界面用户登陆的时候系统会验证该登陆用户是否正在使用系统 如果正在使用就提示该用户正在使用 再次点击登陆按钮 可以强行登陆
用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]

求脚本改进办法
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2010-10-20 14:27:17 | 只看该作者
在脚本中加入判断,检查登录后页面是否跳转到登录成功的页面,还是跳到提示已经登录的页面
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2010-10-20 14:49:05 | 只看该作者
谢谢 是不是能通过web_reg_find判断是否登录成功
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2010-10-20 15:13:52 | 只看该作者
没有看到你登录的脚本呀?
回复 支持 反对

使用道具 举报

该用户从未签到

5#
发表于 2010-10-21 16:16:55 | 只看该作者
LZ录制脚本内容是 用户已经登录系统,给予提示后又再提交,强登录上去?
回放时如果没有使用系统,应该直接登录成功,login.do_3应该就不会去执行吧

我猜测的...
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-9-24 01:26 , Processed in 0.087131 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表