51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 3118|回复: 2
打印 上一主题 下一主题

[原创] LR9.1用web(click and scripts)录制时碰到的问题

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2009-11-11 12:33:07 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
[localimg=400,300]2[/localimg]最近公司一个项目出现了严重的内存泄露,需要确定问题出在哪,为此做了性能测试。
首先用web(http/html)录制,发现很多控件都不能录制到,就连网页的左边按钮都不能录制到,原因是网页使用了一些applet和activex控件。所以尝试用了web(click and sripts)录制,但录制后还是碰到以下两个问题,请求高手指点。

问题一:录制完的recording summary中总是提示网页中的activex控件不被允许,但实际上用IE是可以打开的。
尝试解决方法:1、在回放窗口开启activex控件
              2、IE中开放所有的Activex相关设置

问题二:重放时,登录系统后总是找不到网页中的frame。
尝试解决方法:1、rocording options ---> GUI properties ---> Web event configuration设置成高级
              2、recording options ---> GUI properties ---> advanced 设置附件所示
也曾试勾选”recording rendering-related properties values",但由于实在是太慢了,所以没成功。

没找到frame的replay log和脚本如下
脚本:Action()
{

        web_add_cookie_ex("Cookie=cookieLeftMenuadmin=0,0; domain=191.0.0.9; path=/bapaims/commons/index/",
                ENDITEM,
                LAST);

        web_browser("login.jsp",
                DESCRIPTION,
                ACTION,
                "Navigate=http://191.0.0.9/bapaims/login.jsp",
                LAST);

        lr_think_time(8);


        web_edit_field("userid",
                "Snapshot=t1.inf",
                DESCRIPTION,
                "Type=text",
                "Name=userid",
                ACTION,
                "SetValue=admin",
                LAST);
        lr_think_time(15);

        web_edit_field("password",
                "Snapshot=t2.inf",
                DESCRIPTION,
                "Type=password",
                "Name=password",
                ACTION,
                "SetValue=admin12369874",
                LAST);

        web_static_image("static_image",
                "Snapshot=t3.inf",
                DESCRIPTION,
                "Alt=",
                "ID=",
                "Name=",
                "Ordinal=2",
                ACTION,
                "ClickCoordinates=21,9",
                LAST);




        web_element("政府投资项目管理",
                "Snapshot=t4.inf",
                DESCRIPTION,
                "Text=政府投资项目管理",
                "Tag=TD",
                "FrameName=lelfMenu",
                ACTION,
                "UserAction=Click",
                LAST);
        web_element("项目进度管理",
                "Snapshot=t5.inf",
                DESCRIPTION,
                "Text=项目进度管理",
                "Tag=TD",
                "FrameName=",
                ACTION,
                "FireEvent=onmouseover",
                LAST);
        web_element("A类投资项目",
                "Snapshot=t6.inf",
                DESCRIPTION,
                "Text=A类投资项目",
                "Tag=TD",
                "FrameName=",
                ACTION,
                "FireEvent=onmouseover",
                LAST);

        web_text_link("B类投资项目",
                "Snapshot=t7.inf",
                DESCRIPTION,
                "Text=B类投资项目",
                "FrameName=",
                ACTION,
                "UserAction=Click",
                LAST);

        lr_think_time(4);


        web_element("199",
                "Snapshot=t8.inf",
                DESCRIPTION,
                "Text=199",
                "Tag=TD",
                "FrameName=main",
                ACTION,
                "FireEvent=onmouseover",
                LAST);
        lr_think_time(5);

        web_element("0",
                "Snapshot=t9.inf",
                DESCRIPTION,
                "Text=0",
                "Tag=TD",
                "Ordinal=26",
                "FrameName=main",
                ACTION,
                "FireEvent=onmouseover",
                LAST);

        lr_think_time(5);

        web_element("TD",
                "Snapshot=t10.inf",
                DESCRIPTION,
                "Text=",
                "Tag=TD",
                "Ordinal=81",
                "FrameName=main",
                ACTION,
                "FireEvent=onmouseover",
                LAST);

        web_check_box("checkbox1",
                "Snapshot=t11.inf",
                DESCRIPTION,
                "Name=checkbox1",
                "Ordinal=63",
                "FrameName=main",
                ACTION,
                "Set=ON",
                LAST);

        web_check_box("checkbox1_2",
                "Snapshot=t12.inf",
                DESCRIPTION,
                "Name=checkbox1",
                "Ordinal=64",
                "FrameName=main",
                ACTION,
                "Set=ON",
                LAST);

        web_check_box("checkbox1_3",
                "Snapshot=t13.inf",
                DESCRIPTION,
                "Name=checkbox1",
                "Ordinal=65",
                "FrameName=main",
                ACTION,
                "Set=ON",
                LAST);

        lr_think_time(4);

        web_button("INPUT",
                "Snapshot=t14.inf",
                DESCRIPTION,
                "Type=button",
                "Tag=INPUT",
                "ID=",
                "Value=打印二",
                "FrameName=main",
                ACTION,
                "UserAction=Click",
                LAST);

        lr_think_time(20);


        web_browser("Close",
                "Snapshot=t15.inf",
                DESCRIPTION,
                "Ordinal=2",
                ACTION,
                "UserAction=Close",
                LAST);
        lr_think_time(7);


        web_element("0_2",
                "Snapshot=t16.inf",
                DESCRIPTION,
                "Text=0",
                "Tag=TD",
                "Ordinal=175",
                "FrameName=main",
                ACTION,
                "FireEvent=onmouseover",
                LAST);
        web_image_link("image_link",
                "Snapshot=t17.inf",
                DESCRIPTION,
                "Alt=",
                "ID=",
                "Name=",
                "Ordinal=5",
                "FrameName=banner",
                ACTION,
                "ClickCoordinates=31,17",
                LAST);

        return 0;
}

[ 本帖最后由 rocky_chen0423 于 2009-11-12 09:31 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?(注-册)加入51Testing

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2009-11-12 09:41:28 | 只看该作者
现在问题倒是解决了,不过是不知道为什么应该这样做。
解决方法就是recording options ---> http properties ---> 勾选recording engin。
目前疑惑的是这个所谓的earlier recording engin到底是什么engin。
其实现在大部分网页都会带很多activex元素以及其他一些不知名的东西,按道理用新出的web(click and scripts)应该是可以的,但不知道为什么就是不行,就连录制http://mail.sohu.com登录都不行。所以目前正在努力探索这种录制模式,而且奇怪的是别人的login是用web_image_submit,而我的确是web_static_image.
回复 支持 反对

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2009-11-11 12:35:11 | 只看该作者
回放log
Action.c(17): web_edit_field("userid") was successful          [MsgId: MMSG-26392]
Action.c(27): web_edit_field("password") was successful          [MsgId: MMSG-26392]
Action.c(36): Submitting form to "http://191.0.0.9/bapaims/login.do?method=Login"          [MsgId: MMSG-26245]
Action.c(36): Downloading script "http://191.0.0.9/bapaims/scripts/prototype.js" (detected in HTML)          [MsgId: MMSG-26534]
Action.c(36): Downloading a resource of a "LINK" element with URL="http://191.0.0.9/bapaims/styles/index.css"          [MsgId: MMSG-26188]
Action.c(36): Opening a window with URL="http://191.0.0.9/bapaims/index.jsp"          [MsgId: MMSG-26243]
Action.c(36): Downloading script "http://191.0.0.9/bapaims/scripts/prototype.js" (detected in HTML)          [MsgId: MMSG-26534]
Action.c(36): Retrieving data from cache for "http://191.0.0.9/bapaims/scripts/prototype.js"          [MsgId: MMSG-26558]
Action.c(36): Downloading a frame with URL="http://191.0.0.9/bapaims/commons/index/indexTop.jsp"          [MsgId: MMSG-26241]
Action.c(36): Downloading a frame with URL="http://191.0.0.9/bapaims/commons/index/indexLeft.jsp"          [MsgId: MMSG-26241]
Action.c(36): Downloading a frame with URL="http://191.0.0.9/bapaims/commons/index/indexTitle.jsp"          [MsgId: MMSG-26241]
Action.c(36): Downloading a frame with URL="http://191.0.0.9/bapaims/proBaseinfoAction.do?method=toIndexPage"          [MsgId: MMSG-26241]
Action.c(36): Downloading a frame with URL="http://191.0.0.9/bapaims/commons/index/indexBottom.jsp"          [MsgId: MMSG-26241]
Action.c(36): Downloading script "http://191.0.0.9/bapaims/scripts/prototype.js" (detected in HTML)          [MsgId: MMSG-26534]
Action.c(36): Retrieving data from cache for "http://191.0.0.9/bapaims/scripts/prototype.js"          [MsgId: MMSG-26558]
Action.c(36): Downloading a resource of a "LINK" element with URL="http://191.0.0.9/bapaims/styles/indexstyle.css"          [MsgId: MMSG-26188]
Action.c(36): Downloading script "http://191.0.0.9/bapaims/scripts/YWSlideMenu .js" (detected in HTML)          [MsgId: MMSG-26534]
Action.c(36): Downloading script "http://191.0.0.9/bapaims/scripts/prototype.js" (detected in HTML)          [MsgId: MMSG-26534]
Action.c(36): Retrieving data from cache for "http://191.0.0.9/bapaims/scripts/prototype.js"          [MsgId: MMSG-26558]
Action.c(36): Downloading TD background="http://191.0.0.9/bapaims/images/indeximg/sy-01.gif"          [MsgId: MMSG-35190]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/images/indeximg/image2.jpg" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/images/indeximg/sy-03.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/images/indeximg/sy-04.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/images/indeximg/sy-05.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/images/indeximg/sy-06.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/images/indeximg/sy-07.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/images/indeximg/image3.jpg" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading script "http://191.0.0.9/bapaims/scripts/prototype.js" (detected in HTML)          [MsgId: MMSG-26534]
Action.c(36): Retrieving data from cache for "http://191.0.0.9/bapaims/scripts/prototype.js"          [MsgId: MMSG-26558]
Action.c(36): Downloading a resource of a "LINK" element with URL="http://191.0.0.9/bapaims/styles/extremecomponents.css"          [MsgId: MMSG-26188]
Action.c(36): Downloading a resource of a "LINK" element with URL="http://191.0.0.9/bapaims/styles/skin2.css"          [MsgId: MMSG-26188]
Action.c(36): Downloading script "http://191.0.0.9/bapaims/scripts/extremecomponents.js" (detected in HTML)          [MsgId: MMSG-26534]
Action.c(36): Downloading script "http://191.0.0.9/bapaims/scripts/prototype.js" (detected in HTML)          [MsgId: MMSG-26534]
Action.c(36): Retrieving data from cache for "http://191.0.0.9/bapaims/scripts/prototype.js"          [MsgId: MMSG-26558]
Action.c(36): Resource "http://191.0.0.9/bapaims/styles/skin.css" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(36): Downloading script "http://191.0.0.9/bapaims/scripts/prototype.js" (detected in HTML)          [MsgId: MMSG-26534]
Action.c(36): Retrieving data from cache for "http://191.0.0.9/bapaims/scripts/prototype.js"          [MsgId: MMSG-26558]
Action.c(36): Downloading script "http://191.0.0.9/bapaims/scripts/extremecomponents.js" (detected in HTML)          [MsgId: MMSG-26534]
Action.c(36): Downloading BODY background="http://191.0.0.9/bapaims/commons/index/bg3.gif"          [MsgId: MMSG-26527]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/commons/index/ywMenu/yw019.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/commons/index/ywMenu/yw021.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading TD background="http://191.0.0.9/bapaims/commons/index/ywMenu/yw022.gif"          [MsgId: MMSG-35190]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/commons/index/ywMenu/yw020.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/commons/index/ywMenu/yw021-1.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading an inline frame with URL="http://191.0.0.9/bapaims/commons/index/indexLelfMenu.jsp"          [MsgId: MMSG-26156]
Action.c(36): Resource "http://191.0.0.9/bapaims/images/indeximg/bg.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/images/buttom-7.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Retrieving data from cache for "http://191.0.0.9/bapaims/scripts/extremecomponents.js"          [MsgId: MMSG-26558]
Action.c(36): Downloading script "http://191.0.0.9/bapaims/scripts/common.js" (detected in HTML)          [MsgId: MMSG-26534]
Action.c(36): Downloading script "http://191.0.0.9/bapaims/scripts/prototype.js" (detected in HTML)          [MsgId: MMSG-26534]
Action.c(36): Retrieving data from cache for "http://191.0.0.9/bapaims/scripts/prototype.js"          [MsgId: MMSG-26558]
Action.c(36): Downloading a resource of a "LINK" element with URL="http://191.0.0.9/bapaims/commons/index/indexLelf.css"          [MsgId: MMSG-26188]
Action.c(36): Downloading a resource of a "LINK" element with URL="http://191.0.0.9/bapaims/commons/index/indexLelf2.css"          [MsgId: MMSG-26188]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/commons/index/indexLelf/bg_menu.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/images/NodeImg2.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/images/extremecomponent/firstPageDisabled.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/images/extremecomponent/prevPageDisabled.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/images/extremecomponent/nextPageDisabled.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/images/extremecomponent/lastPageDisabled.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/images/extremecomponent/separator.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/commons/index/indexLelf/bg1.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/commons/index/indexLelf/menu_td_rt_bg.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Downloading resource "http://191.0.0.9/bapaims/commons/index/indexLelf/menu_srco_point.gif" (detected in HTML)          [MsgId: MMSG-26529]
Action.c(36): Warning -26278: Running ActiveX objects disallowed for this Vuser type. Use the "AJAX (Click and Script)" protocol          [MsgId: MWAR-26278]
Action.c(36): Warning -26295: JavaScript error in line 1: JavaScript evaluation error when executing function (by pointer)          [MsgId: MWAR-26295]
Action.c(36): Warning -26000: Evaluating decompiled script failed for "Window" DOM object (name="lelfMenu") "load", listed in the following line:          [MsgId: MWAR-26000]
Action.c(36): Warning -26000:  function () {
     getDomObject();
     getXML();
     getCookie();
     createMenu();
     arrayFolder = new Array();
     tbl = document.getElementById("tbl");
     fileTD = document.getElementById("fileTD");
     rightArrow = document.getElementById("rightArrow");
     for (var i = 0; i < currentThumbCount; i++) {
         delRow();
     }
     memorizeThumb();
     getHandleOffsetHeight();
}          [MsgId: MWAR-26000]
Action.c(36): web_static_image("static_image") highest severity level was "warning", 331019 body bytes, 8806 header bytes, 48 chunking overhead bytes          [MsgId: MMSG-26387]
Action.c(49): Error -26190: Web element not found (Tag is "TD", Text is "政府投资项目管理")          [MsgId: MERR-26190]
Action.c(49): Found 2 TD object(s) in the browser/frame:          [MsgId: MMSG-26177]
Action.c(49):         [1] Name="", Id="", Text=""          [MsgId: MMSG-26000]
Action.c(49):         [2] Name="", Id="", Text=" "          [MsgId: MMSG-26000]
Action.c(49): web_element("政府投资项目管理") highest severity level was "ERROR"          [MsgId: MMSG-26391]
Abort was called from an action.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.

[ 本帖最后由 rocky_chen0423 于 2009-11-12 09:32 编辑 ]
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-11-9 09:36 , Processed in 0.078959 second(s), 29 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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