抽出裤衩里的猴皮筋做个弹弓子打你们家玻璃………………

发布新日志

  • 【转】Jmeter使用之脚本录制回放

    2007-08-02 15:52:19

    1、启动。
     刚才在家里的机器上下载安装了Jmeter2.02版,启动时总是提示“Error occurred during initialization of VM   Could not reserve enough space for object heap”,完了,128M的内存跑不起来一个小小的Jmeter :(。怎么办?修改Jmeter的启动参数“set HEAP=-Xms256m -Xmx256m”“
    set NEW=-XX:NewSize=128m -XX:MaxNewSize=128m”,改256->56,128->28。这里只是一个小小的插曲,实际使用时不要这么改哦。好了,可以启动了:)
     2、下面说Jmeter中的脚本录制。
     (1)选中Test Plan单击鼠标右键,在弹出菜单中选择Add->Thread Group;
     (2)接下来选中WorkBench单击鼠标右键,在弹出菜单中选择Add->Non-Test Elements->HTTP Proxy Server;
     (3)在“HTTP Proxy Server”窗口中Target Controller下拉框选择Test Plan > Thread Group(表示脚本生成在这个线程组下),Grouping下拉框选择Put each group in a new controller(表示把每组脚本放到一个新的组中,避免生成的脚本杂乱且无法组织);
     (4)单击窗口最下方的Start;
     (5)打开浏览器,设置代理服务器的设置为localhot,端口号为8080(在“HTTP Proxy Server”窗口中设置了使用8080端口进行侦听);
     (6)在地址中键入要录制页面的URL对页面进行操作,Jmeter就会自动把所进行的操作录制成为脚本了,可以看到Thread Group节点下面多了许多的子节点就是录制生成的脚本;
     (7)操作完毕后在Jmeter中单击Stop先停止录制,然后把浏览器的代理设置改为原来的设置即可。
     3、运行及记录结果设置
     (1)完成脚本的录制后还需要定义你所需的结果设置才算完成了Test Plan的设置,首先要设置Thread Group(相当于虚拟用户组)的属性,单击Thread Group,在右边的窗口中设置Number of Thread(相当于虚拟用户数)为5,Ramp-Up Period(in seconds)为1,Loop Cout选项取消选中Forever,在右边的框中输入2。以上设置表示共有5个虚拟用户,每隔1秒运行一个,迭代2次。
     (2)要查看运行的结果还需要加入Listener,选中Thread Group单击鼠标右键选择Listener->View Results in Table,通过这个视图可以查看到每个链接的执行情况,包括执行时间和成功与否,再加入Aggregate Report,通过这个视图可以查看每个Thread Group组的最大、最小和平均响应时间。加入View Results Tree,通过这个视图可以查看每个链接的执行情况,包括发出的请求和服务器返回的详细内容。
     (3)OK,所有的设置暂到此结束,接下载可以运行了。
     4、运行及结果查看
     (1)OK,运行看看吧,由于设置运行时间较短,所以先选择View Results in Table,然后按下Ctrl+r键开始运行脚本,就可以看到每个请求的运行结果了,还可以单击其他两个结果视图实时查看运行结果。
     说了这么多相信读者已经对这个工具有些感性的认识了吧,简单、便捷、跨平台、随手拈来即可使用,是它最大的有点(占内存是Java无法避免的,出现最先一幕)。不过我的本意是想说说使用使用Jmeter进行查询内容参数化的,没想到就简单使用也花费了这么多篇幅,那只有下一节再叙了。总的感觉这个工具比较“爽”。
    本文原在我的另一个blog上,因为已经不用那个了,所以再次贴到这里来。这里再附上我使用的一段脚本——设置浏览器代理服务器的脚本,功能是设置代理服务器为localhost,端口为8080,并打开一个浏览器实例,关闭该实例则取消代理服务器的设置。注意:此脚本在我的机器上运行通过的,如果您要使用请自己修改,由于是对注册表的操作,所以请不熟悉的朋友慎用,或者使用其他有类似功能的软件。
    '*******************************************************************************
    '脚本说明:使用本脚本可以设置代理为localhost:8080,关闭浏览器后自动取消代理设置。
    '创 建 人:wyingquan at hotmail dot com
    '创建时间:2004-11-24 星期三
    '*******************************************************************************
    '保存当前设置
    Set reg=Wscrīpt.CreateObject("Wscrīpt.Shell")
    '设置浏览器使用代理,服务器名localhost,端口号8080
    reg.regwrite  "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable",1,"REG_DWORD"
    reg.regwrite  "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer","localhost:8080","REG_SZ"
    reg.regwrite  "HKLM\SYSTEM\ControlSet001\Hardware Profiles\Current\Software\Microsoft\windows\CurrentVersion\Internet Settings",1,"REG_DWORD"
    reg.regwrite  "HKLM\SYSTEM\ControlSet001\Hardware Profiles\0001\Software\Microsoft\windows\CurrentVersion\Internet Settings",1,"REG_DWORD"
    reg.regwrite  "HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\0001\Software\Microsoft\windows\CurrentVersion\Internet Settings\ProxyEnable",1,"REG_DWORD"
    reg.regwrite  "HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\Software\Microsoft\windows\CurrentVersion\Internet Settings\ProxyEnable",1,"REG_DWORD"
    '获取浏览器执行文件的位置
    RunMe=reg.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE\")
    '等待用户输入要打开的页面
    sUrl=InputBox("请输入要打开的URL地址或者取消直接在浏览器地址栏中打开:","VBS For Jmeter","http://")
    '打开测试页面
    Set ōExec=Reg.Exec(RunMe & " " & sUrl)
    '一直等待关闭浏览器为止才继续运行脚本
    Do While oExec.Status = 0
          Wscrīpt.Sleep 100
    Loop
    '撤销代理服务设置
    reg.regwrite  "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable",ProxyEnable,"REG_DWORD"
    reg.regwrite  "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer",ProxyServer,"REG_SZ"
    reg.regwrite  "HKLM\SYSTEM\ControlSet001\Hardware Profiles\Current\Software\Microsoft\windows\CurrentVersion\Internet Settings",0,"REG_DWORD"
    reg.regwrite  "HKLM\SYSTEM\ControlSet001\Hardware Profiles\0001\Software\Microsoft\windows\CurrentVersion\Internet Settings",0,"REG_DWORD"
    reg.regwrite  "HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\0001\Software\Microsoft\windows\CurrentVersion\Internet Settings\ProxyEnable",0,"REG_DWORD"
    reg.regwrite  "HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\Software\Microsoft\windows\CurrentVersion\Internet Settings\ProxyEnable",0,"REG_DWORD"
    Set reg=nothing
    MsgBox "OK",,"VBS For Jmeter"
  • 如何使用Jmeter录制网站性能测试脚本?

    2007-08-02 15:50:56

    1、录制脚本:(1)选中Test Plan单击鼠标右键,在弹出菜单中选择Add->Thread Group;(2)接下来选中WorkBench单击鼠标右键,在弹出菜单中选择Add->Non-Test Elements->HTTP Proxy Server;(3)在“HTTP Proxy Server”窗口中Target Controller下拉框选择Test Plan > Thread Group(表示脚本生成在这个线程组下),Grouping下拉框选择Put each group in a new controller(表示把每组脚本放到一个新的组中,避免生成的脚本杂乱且无法组织);(4)单击窗口最下方的Start;(5)打开浏览器,设置代理服务器的设置为localhot,端口号为8080(在“HTTP Proxy Server”窗口中设置了使用8080端口进行侦听);(6)在地址中键入要录制页面的URL对页面进行操作,Jmeter就会自动把所进行的操作录制成为脚本了,可以看到Thread Group节点下面多了许多的子节点就是录制生成的脚本;(7)操作完毕后在Jmeter中单击Stop先停止录制,然后把浏览器的代理设置改为原来的设置即可。

            2、运行及记录结果设置:(1)完成脚本的录制后还需要定义你所需的结果设置才算完成了Test Plan的设置,首先要设置Thread Group(相当于虚拟用户组)的属性,单击Thread Group,在右边的窗口中设置Number of Thread(相当于虚拟用户数)为5,Ramp-Up Period(in seconds)为1,Loop Cout选项取消选中Forever,在右边的框中输入2。以上设置表示共有5个虚拟用户,每隔1秒运行一个,迭代2次。(2)要查看运行的结果还需要加入Listener,选中Thread Group单击鼠标右键选择Listener->View Results in Table,通过这个视图可以查看到每个链接的执行情况,包括执行时间和成功与否,再加入Aggregate Report,通过这个视图可以查看每个Thread Group组的最大、最小和平均响应时间。加入View Results Tree,通过这个视图可以查看每个链接的执行情况,包括发出的请求和服务器返回的详细内容。 

            以上就是录制和运行的全部内容,如果有更复杂的操作需求,Jmeter也可以修改脚本和参数化变量,

  • 性能测试的有关定义

    2007-07-25 10:01:29

     

    性能 perfotmance —— 应用程序的性能是进行典型操作所需的时间。性能常常用 响应时间 的标准来衡量。性能经常是重要的业务需求之一。
     

    响应时间 response time —— 是应用程序处理一个请求所需的时间 比如:从用户的浏览器得到的一个 HTTP 请求 一般我们对平均响应时间感兴趣,在负载增大时响应时间的一贯性也很重要。提高负载后若响应时间曲线出现锯齿,往往说明性能乏善可陈,还有潜在的不稳定。
     

    延迟时间 latency ——是从应用程序得到反馈所需的最少时间(不管程序是否需要做多工作才能得到这个反馈,远程方法调用具有很长的延迟;不管被调用的方法是否成功,都有一个固定的最小开销)。
     

    吞吐量( throughput )——是程序或者组件在一段给定时间内所能进行工作的总和(对 web 应用来说,常常用每秒点击率来衡量;对事务处理应用来说,则是每秒能完成的事务数)。
     

    可伸缩性( scalability )——指应用程序如何应对增长的流量。说到可伸缩性的时候,我们通常指向上可伸缩( scaling up ),以便应对更大的负载。可伸缩性经常等价于水平可伸缩性( horizontal scalability ):向上伸缩到服务器集群来提高吞吐量。 我们也可以通过把应用转移到更强的服务器上来提高吞吐量。后者要简单得多,但显然并不能让应用更牢固,也只能得到有限的提高。
    另一种选择是垂直伸缩(
    vertical scaling ):在每台服务器上运行多份服务。“垂直伸缩”这个术语被 Fowler 用来指“为单台服务器增加更多的计算能力”,比如添加额外的 CPU 或者内存。
    性能和可伸缩性有时候在现实中是对立的。能在单台服务器上高性能运行的应用,却可能无法被部署到集群中, 比如:为了获得高性能,针对每个用户在 session 中维护大量的数据;而在集群环境下,这些数据无法被高效地复制。然而,必须意识到,性能地下的应用同样不会具有很好的可伸缩性。如果应用程序在单台服务器上浪费资源,就以为着即便在集群中运行,也只不过是浪费更多的资源。
     

    性能测试简单说,就是在预期的压力下,我的应用能跑多快。注意,这里的压力是你预期的,更多的时候就是你的性能指标。

    负载测试( load test )——目标是给系统以期望的负载量[ 在没有速度要求的情况下,我的应用能支撑多少的并发用户,这里更多的是考虑容量。 ]

    压力测试( stress test )——目标是在超过期望能力时确定系统行为[ 超过容量压力下的表现,也关注应用的恢复能力,这里更多的是关注系统的变化,属于健壮性测试(robustness )一类 ]

    稳定性测试 stability test )—— 测试系统长时间运行的表现,更多的是发现一些资源泄漏等问题,一般压力随便设置。

    基准测试对比性测试 benchmark ——一般用来厂商之间同类产品之间,相同产品版本之间的对比。

  • CMD命令大全

    2007-07-19 08:54:42

    有关某个命令的详细信息,请键入 HELP 命令名


    XP.CMD命令大全


    有关某个命令的详细信息,请键入 HELP 命令名
    ASSOC 显示或修改文件扩展名关联。
    AT 计划在计算机上运行的命令和程序。
    ATTRIB 显示或更改文件属性。
    BREAK 设置或清除扩展式 CTRL+C 检查。
    CACLS 显示或修改文件的访问控制列表(ACLs)。
    CALL 从另一个批处理程序调用这一个。
    CD 显示当前目录的名称或将其更改。
    CHCP 显示或设置活动代码页数。
    CHDIR 显示当前目录的名称或将其更改。
    CHKDSK 检查磁盘并显示状态报告。
    CHKNTFS 显示或修改启动时间磁盘检查。
    CLS 清除屏幕。
    CMD 打开另一个 Windows 命令解释程序窗口。
    COLOR 设置默认控制台前景和背景颜色。
    COMP 比较两个或两套文件的内容。
    COMPACT 显示或更改 NTFS 分区上文件的压缩。
    CONVERT 将 FAT 卷转换成 NTFS。您不能转换
    当前驱动器。
    COPY 将至少一个文件复制到另一个位置。
    DATE 显示或设置日期。
    DEL 删除至少一个文件。
    DIR 显示一个目录中的文件和子目录。
    DISKCOMP 比较两个软盘的内容。
    DISKCOPY 将一个软盘的内容复制到另一个软盘。
    DOSKEY 编辑命令行、调用 Windows 命令并创建宏。
    ECHO 显示消息,或将命令回显打开或关上。
    ENDLOCAL 结束批文件中环境更改的本地化。
    ERASE 删除至少一个文件。
    EXIT 退出 CMD.EXE 程序(命令解释程序)。
    FC 比较两个或两套文件,并显示
    不同处。
    FIND 在文件中搜索文字字符串。
    FINDSTR 在文件中搜索字符串。
    FOR 为一套文件中的每个文件运行一个指定的命令。
    FORMAT 格式化磁盘,以便跟 Windows 使用。
    FTYPE 显示或修改用于文件扩展名关联的文件类型。
    GOTO 将 Windows 命令解释程序指向批处理程序
    中某个标明的行。
    GRAFTABL 启用 Windows 来以图像模式显示
    扩展字符集。
    HELP 提供 Windows 命令的帮助信息。
    IF 执行批处理程序中的条件性处理。
    LABEL 创建、更改或删除磁盘的卷标。
    MD 创建目录。
    MKDIR 创建目录。
    MODE 配置系统设备。
    MORE 一次显示一个结果屏幕。
    MOVE 将文件从一个目录移到另一个目录。
    PATH 显示或设置可执行文件的搜索路径。
    PAUSE 暂停批文件的处理并显示消息。
    POPD 还原 PUSHD 保存的当前目录的上一个值。
    PRINT 打印文本文件。
    PROMPT 更改 Windows 命令提示符。
    PUSHD 保存当前目录,然后对其进行更改。
    RD 删除目录。
    RECOVER 从有问题的磁盘恢复可读信息。
    REM 记录批文件或 CONFIG.SYS 中的注释。
    REN 重命名文件。
    RENAME 重命名文件。
    REPLACE 替换文件。
    RMDIR 删除目录。
    SET 显示、设置或删除 Windows 环境变量。
    SETLOCAL 开始批文件中环境更改的本地化。
    SHIFT 更换批文件中可替换参数的位置。
    SORT 对输入进行分类。
    START 启动另一个窗口来运行指定的程序或命令。
    SUBST 将路径跟一个驱动器号关联。
    TIME 显示或设置系统时间。
    TITLE 设置 CMD.EXE 会话的窗口标题。
    TREE 以图形模式显示驱动器或路径的目录结构。
    TYPE 显示文本文件的内容。
    VER 显示 Windows 版本。
    VERIFY 告诉 Windows 是否验证文件是否已正确
    写入磁盘。
    VOL 显示磁盘卷标和序列号。
    XCOPY 复制文件和目录树。


    appwiz.cpl------------添加删除程序

    control userpasswords2--------用户帐户设置

    cleanmgr-------垃圾整理

    CMD--------------命令提示符可以当作是 Windows 的一个附件,Ping,Convert 这些不能在图形环境下 使用的功能要借助它来完成。

    cmd------jview察看Java虚拟机版本。


    command.com------调用的则是系统内置的 NTVDM,一个 DOS虚拟机。它完全是一个类似 Virtual PC 的 虚拟环境,和系统本身联系不大。当我们在命令提示符下运行 DOS 程序时,实际上也 是自动转移到 NTVDM虚拟机下,和 CMD 本身没什么关系。


    calc-----------启动计算器

    chkdsk.exe-----Chkdsk磁盘检查

    compmgmt.msc---计算机管理

    conf-----------启动 netmeeting

    control userpasswords2-----User Account 权限设置

    devmgmt.msc--- 设备管理器

    diskmgmt.msc---磁盘管理实用程序

    dfrg.msc-------磁盘碎片整理程序

    drwtsn32------ 系统医生

    dvdplay--------启动Media Player

    dxdiag-----------DirectX Diagnostic Tool

    gpedit.msc-------组策略编辑器

    gpupdate /target:computer /force 强制刷新组策略

    eventvwr.exe-----事件查看器

    explorer-------打开资源管理器

    logoff---------注销命令

    lusrmgr.msc----本机用户和组

    msinfo32---------系统信息

    msconfig---------系统配置实用程序

    net start (servicename)----启动该服务

    net stop (servicename)-----停止该服务

    notepad--------打开记事本

    nusrmgr.cpl-------同control userpasswords,打开用户帐户控制面板

    Nslookup-------IP地址侦测器

    oobe/msoobe /a----检查XP是否激活

    perfmon.msc----计算机性能监测程序

    progman--------程序管理器

    regedit----------注册表编辑器

    regedt32-------注册表编辑器

    regsvr32 /u *.dll----停止dll文件运行

    route print------查看路由表

    rononce -p ----15秒关机

    rsop.msc-------组策略结果集

    rundll32.exe rundll32.exe %Systemroot%System32shimgvw.dll,ImageView_Fullscreen----启动一个空白的Windows 图片和传真查看器

    secpol.msc--------本地安全策略

    services.msc---本地服务设置

    sfc /scannow-----启动系统文件检查器

    sndrec32-------录音机

    taskmgr-----任务管理器(适用于2000/xp/2003)

    tsshutdn-------60秒倒计时关机命令

    winchat--------XP自带局域网聊天

    winmsd---------系统信息

    winver-----显示About Windows 窗口

    wupdmgr-----------Windows Update
  • 选择PeopleSoft Enterprise协议解决一些无法模拟实际情况的脚本错误

    2007-07-18 15:37:23

    测试一个程序,里面有主要是jsp。有一部分xml,还有一部分javascrīpt。录制一个新增功能,录制完以后,回放的时候无法实现新增功能,也就是说脚本运行的有问题,但是loadrunner还显示顺利通过,没有问题。

    在运行时查看器中查看,有部分地方显示xml出错。

    具体错误提示如下:

    使用XSL样式表无法查看XML输入。请更正错误然后单击 刷新 按钮,或以后重试。

    文档的顶层无效,处理资源‘htlfp://WebViewer47*c:\Documents and setting\myname\桌面\脚本目录\选择单位\result1\Iteration1\t10.html.....’

    <?xml version="1.0" encoding="GBK"?><Root><TreeNode NodeID="001" Title="[001]" NodeXMLSrc="tableDivisionTreeCode.do?superID=001" ></TreeNode></Root>

    在其他日志里面均没有错误,协议选择web(html)那个。

    后来选择了PeopleSoft Enterprise协议,录制,回放,成功实现功能。虽然那个提示还是出现,但不管怎么样是实现功能了。

     

    现在就是不清楚具体是怎么回事,四处打听中……。不知道到底是不是这个xml弄得还是javascrīpt弄得。反正功能是实现了,先凑合用着!

    (路过的同志们,如果知道怎么回事的给说说啊!)

  • QTP 8.2安装问题

    2007-07-17 12:45:26

     

     

     

    安装QTP 8.2的时候选择了不该选择的(网络版的),结果破解重新启动之后出现的是“License Error...”

    解决办法如下:(参考了安装QTP之后,启动QTP进程自动退出

    • 自动卸载:正常卸载软件
    • 手动卸载:51Testing软件测试网%v'w3d6D+TvD1W
        (1) C:\Program Files\Mercury Interactive\QuickTest Professional(安装路径下是否删除完毕)   
      2) C:\Documents and Settings\nana\下面搜索Mercury Interactive,有的话删掉(我用的是XP系统)
       (3) C:\Program Files\Common Files\Mercury Interactive\License Manager51Testing
       (4) 删除注册表:QuicketTest Pro有关的项,全部都删。
      最后你再重启安装就能再次看到图啦~~~
      步骤:
      setup.exe->全是默认的(序列号是0123-2820602186)->next->...->(不要“立即注册”)->
        用破解的QTP 8.2 序列号 & license
        License Generated Successfuly.51Testing软件测试网/c u.rI \
        License Saved: 'C:\Program Files\Common Files\Mercury Interactive\License Manager\lservrc'.
        All Done!
        ->重启
  • microsoft script debugger说明书

    2007-07-17 11:52:34

    microsoft scrīpt debugger说明书

    microsoft scrīpt debugger release notes

    © microsoft corporation, 1997

    this document provides information about using the microsoft scrīpt debugger, including tips for installing and using the debugger successfully, and information that became available too late to be included in the documentation.

    contents

    installing and starting the scrīpt debugger

    viewing debugger documentation

    html source editor

    scrīpt debugging in internet explorer 4.0

    scrīpt debugging in internet information server 4.0

    debugging java

    copyright information

    --------------------------------------------------------------------------------

    installing and starting the scrīpt debugger

    using the scrīpt debugger with microsoft® visual studio™ 98 in general, you should not install the scrīpt debugger if you have already installed visual studio 98 or any of its component products such as microsoft® visual interdev™ or microsoft® visual j++™. visual studio includes its own debugger that you can use to debug scrīpts and java components. if you install the scrīpt debugger after installing any visual studio products and you will no longer be able to start the visual studio debugger in response to errors reported by internet explorer 4.0.

    using the correct version microsoft scrīpt debugger works with microsoft internet explorer 4.0 or with internet information server 4.0. because the scrīpt debugger is designed to be generic across scrīpt hosts, setup does not check for specific versions of products being installed, so you must ensure that you are running the correct versions of these products. if you attempt to use the scrīpt debugger with earlier versions of internet explorer (such as internet explorer 3.0 or the platform preview release of internet explorer 4.0), or with earlier versions of internet information server, the debugger will not work and could disrupt iis service.

    uninstalling previous versions of the scrīpt debugger if you installed the scrīpt debugger for internet explorer 3.0, you must uninstall that version before proceeding with this installation.

    uninstalling iis if you uninstall internet information server 4.0, the uninstall process will also remove the scrīpt debugger, even if you installed the scrīpt debugger separately. you can reinstall the scrīpt debugger by running the iis installation and choosing to install just the scrīpt debugger.

    --------------------------------------------------------------------------------

    viewing debugger documentation

    starting a browser before displaying help help is displayed in the default web browser. if you are running internet information server, start internet explorer 4.0 before choosing help topics from the help menu. if the browser is not already running when you display help, the debugger might display a blank window, and the scrīpt debugger might hang.

    viewing help if no browser is installed on the server if you are debugging on a server that has no browser installed, you might not be able to view help, because help is displayed in the default browser. however, if you have permission to access the web server as a file server, you can try using a browser on another machine to view the help file. look for a file on the server called sdbug.htm, and use file protocol (file://), not http protocol (http://).

    --------------------------------------------------------------------------------

    html source editor

    entering file names when opening html documents when you choose open from the file menu to open an existing document in the scrīpt debugger, you must provide a complete file name, including extension, in the file name box.

    opening html documents from the desktop in microsoft® windows nt® in windows nt, when you use the open dialog box to open a file, you can display documents by selecting desktop from the look in list. however, in this version of the debugger, the content of the open dialog box reflects the desktop setting for the default user, not for the current user.

    opening documents in windows nt shared directories in windows nt, when you use the open dialog box to open a file on a shared drive with password protection, use "\*" at the end of the path and file name, as in this example:

    \\myshare\myfolder\*

    --------------------------------------------------------------------------------

    scrīpt debugging in internet explorer 4.0

    debugging in the active desktop if you use the scrīpt debugger when internet explorer is in active desktop mode, all programs that are integrated into the active desktop are controlled by the debugger. for example, because windows explorer is part of the active desktop, it will be suspended when the debugger is open and waiting at a breakpoint. when you run the current document or close the debugger, windows explorer will again work normally.

    browsing a document after closing the debugger if you finish a debugging session and close the scrīpt debugger, and then return to internet explorer and continue working with the document you were just debugging, the browser sometimes restarts the debugger.

    working with multiple documents if you open two documents in two windows in internet explorer, you can debug only one of them at a time. for example, if you are in break mode in one document (are at a breakpoint or are stepping through code), you cannot also be working in the other document.

    entering commands in the command window you can display the command window at any time while the scrīpt debugger is open, but commands that you type into the command window have no effect unless you are in break mode.

    problems debugging after executing document.write using the document.write command can cause problems under these circumstances:

    if a document.write command is followed by a stop (in visual basic®, scrīpting edition -- vbscrīpt) or a debugger (jscrīpt™) command, the debugger will be launched. however, at that point page processing has been interrupted in internet explorer, so you must press f5 to finish loading the document.

    if a document.write command is followed by a breakpoint, the breakpoint is ignored.

    if you enter a document.write command in the command window while at a breakpoint, internet explorer might quit responding to commands.

    setting breakpoints on invalid lines if you attempt to set a breakpoint on a line that does not contain scrīpt (such as a line of html code) the scrīpt debugger sets the breakpoint on the next valid code statement, even if that statement is many lines away from where you tried to set the breakpoint.

    calling functions with breakpoints in the command window, if you call a function that contains a breakpoint, internet explorer might hang.

    displaying the line indicator correctly the scrīpt debugger might not display the current line indicator properly if:

    you are stepping through inline jscrīpt code.

    the document you are debugging is displayed in a frame.

    note if the line indicator is not properly displayed, you can try stepping into the next line to restore the indicator.

    features not fully implemented the following features are not fully implemented in this version of the scrīpt debugger:

    viewing variable values to see the value of a variable, use the command window. the scrīpt debugger does not include a watch window, as in some other debuggers. for more details, see the scrīpt debugger documentation.

    setting breakpoints by clicking to set a breakpoint, choose toggle breakpoint from the debug menu, or press f9. you cannot set a breakpoint on a line by clicking in the margin to the left of the line, as you can in some environments.

    known issues when debugging client scrīpts the following are additional known issues with using this version of the scrīpt debugger in internet explorer 4.0:

    if you are debugging a document, return to it in internet explorer, refresh it, continue debugging it, refresh it again, and then repeat this process, internet explorer might hang or show other unexpected behavīor.

    if you minimize a child window in the debugger, such as the command window or running documents window, the restore command on the control menu is unavailable. to restore the minimized child window, maximize it, and then resize it by dragging its corners.

    --------------------------------------------------------------------------------

    scrīpt debugging in internet information server 4.0

    note be sure to review the information under scrīpt debugging in internet explorer 4.0 as well.

    inspecting variables after a run-time error if you invoke the debugger after a run-time error, the command window cannot be used to inspect variable values in an asp page. however, you can still evaluate expressions using the default language.

    debugging cached pages if you are using internet explorer 3.0 to request pages from the server, or you are using internet explorer 4.0 and have set the browser to cache pages (you set "check for newer versions of stored pages" to "never"), stop and debugger command will be ignored.

    illegal object references in the command window in the command window, if you create an instance of an object and then use improper syntax to reference its properties or methods, the scrīpt debugger might hang. for example, in the following sequence of vbscrīpt commands, the second is illegal because it is not preceded with a "?" operator, and will therefore hang the debugger:

    set myobj = server.createobject("mswc.browsertype")

    myobj.frames

    debugging after iis has been shut down if you shut down internet information server while a debugging session is running, and then attempt to continue debugging, the scrīpt debugger will generate a general protection fault.

    calling functions repeatedly if you are at a breakpoint, open the command window, and call a function repeatedly that is defined in a scrīpt on the page, the debugger might hang when you continue running the document.

    --------------------------------------------------------------------------------

    debugging java

    debugging java this release of the scrīpt debugger includes support for debugging java code in client applications, including setting breakpoints, checking the call stack, and using the command window. however, debugging java code on internet information server is not fully supported, and can result in unexpected behavīor.

    debugging java applications on dec alpha computers this version of the scrīpt debugger does not fully support debugging java applications on dec alpha computers. if you attempt to debug java applications, you might experience errors.

    debugging a multi-threaded java application if you break into a java application that is using multiple threads, you can navigate to another thread by choosing it in the call stack window. when you do, the current line indicator is displayed in the thread to which you have navigated. however, debugger commands such as step into, step over, and so on, affect only to the thread where the scrīpt debugger broke, not the one to which you have navigated and which shows the current line indicator.

    --------------------------------------------------------------------------------

    copyright information

    © 1997 microsoft corporation

    these materials are provided “as-is,” for informational purposes only.

    neither microsoft nor its suppliers makes any warranty, express or implied with respect to the content of these materials or the accuracy of any information contained herein, including, without limitation, the implied warranties of merchantability or fitness for a particular purpose. because some states/jurisdictions do not allow exclusions of implied warranties, the above limitation may not apply to you.

    neither microsoft nor its suppliers shall have any liability for any damages whatsoever including consequential, incidental, direct, indirect, special, and lost profits. because some states/jurisdictions do not allow exclusions of implied warranties, the above limitation may not apply to you. in any event, microsoft’s and its suppliers’ entire liability in any manner arising out of these materials, whether by tort, contract, or otherwise shall not exceed the suggested retail price of these materials.
  • 给别人做了两个小时培训,挺有意思!

    2007-07-16 17:29:45

    初学性能测试的我居然也给别人做培训了,下午给测试组的同志们讲了一遍LR的流程,很有成就感啊,我都能给别人讲东西了,学习中,进步中……
  • QTP与WinRunner区别

    2007-07-16 09:44:01

        QTP,全称为Quick Test Professional,它与WinRunner同为MI公司开发的功能强大的功能测试工具。从时间上来看,WinRunner在1995年便已经推出,远早于QTP,而QTP直到2002年才正式推出。从MI公司提供的一些官方资料来看,虽然他们宣称暂时不准备淘汰WinRunner,但他们的宣传资料上又明确表示,QTP已经具备了WinRunner中几乎所有的特性,同时具备了一些独有的特性,并且总体来说,使用更简单、更易扩展和维护,推荐新用户使用QTP,并建议已使用WinRunner的老客户逐渐实现转换。由此看来,MI公司实际上已经有使用QTP逐步取代WinRunner的计划。更重要的是,QTP对J2EE,.NET架构的应用程序支持得比WinRunner要好(从我实际的试用过程中,也感到确实是如此),因此我认为,从我们公司的实际情况出发,针对产品综合部今后将逐步开展自动化测试的计划,QTP应该是一个比较好的选择。
        不论是WinnRunner还是QTP,它们都是功能十分强大的测试工具,加上目前国内关于测试工具的培训和文档资料,实在是少之又少,因此要完全了解和掌握它们,绝不是一朝一夕的事情。在这里我只能就目前对它们的理解程度粗略地介绍一下二者的两点主要不同之处。
        1、使用的脚本语言不同。WinRunner使用的是TSL语言,这是MI公司独有的语言,有特殊性,因此在学习上会有一定难度,不过好在它与C 语言比较类似,如果测试人员有一定的C语言编程基础,会相对容易一些。而QTP使用的则是微软的VBscrīpt语言,比较通用,而且也相对简单易学。从语言上的比较上来看,我个人觉得在编程能力上,WinRunner更胜一筹,因为它拥有相当丰富的C语言函数库,而相对而言,QTP则更大众化,它面向的是没有太多技术背景和编程经验的测试人员。
        2、QTP8.0具有的一大特性:关键字驱动测试(keyword-driven testing)。它的具体操作方法我将有另外的文档详细说明,这里只是简单介绍一下。通过“关键字驱动测试”,测试人员不需要“录制”测试脚本,而可以改成“设计”测试脚本。即:先将应用程序的GUI对象添加到QTP的对象仓库(Object Repository)中,然后针对每一个需要操作到的对象设计每个测试步骤。我个人感觉,这的确是一个很酷的特性,它使我们可以不必实际去操作应用程序,就可以编写出测试脚本,这样做既节省了时间,而且还有一个更大的好处就是可以在应用程序还没有设计完成,或者由于出错无法正常执行的时候仍然可以编写我们的测试脚本。应用程序只需要有使用界面(UI),而不必实际运行,测试人员就可以开始建立测试脚本,为我们实施自动化测试赢得更充足的时间。而在 WinRunner中,虽然也可以采用先学习对象,然后编写代码的方式来完成测试脚本,但这样做要求测试人员对TSL语言比较熟悉才做得到,远不如QTP 来得简单。在实际的操作中我还发现,有些时候采用录制的方法无法捕获对应用程序的操作,此时改用关键字驱动测试却可以收到不错的效果。
        3、相对WinRunner,QTP还具有很多优点,例如“数据表整合”,“Active Screen”,“point and click”,更容易参数化等等

    ================================================

    很多初入行的朋友使用测试工具进行功能测试的时候,总是会遇到QTP和WinRunner的选择问题,为什么同样一家公司会出两个功能类似的工具哪? 下面是一篇关于这两个工具的对比介绍,其实从我自己的经验来看,WinRunner虽然推出较早,但是因为一些功能的缺陷,导致后期很难推广,而Quick Test Professinal(QTP)虽然没有师兄WinRunner出道早,然后内功深厚,所以很受欢迎,而且Mercury公司以后的主要发展策略是QTP,虽然文章中说并没有计划Phase out WR,但是已经不再出新版本了. 针对这两个工具的3年左右的使用经验,我的感受是WR比QTP的逊色的地方主要是几点:

    1. WR的对象管理不如QTP那么有效

    2. WR的语言主要是基于类C的TSL,是Mercury发明的语言,明显不如基于VBscrīpt的QTP强

    3. WR的稳定性不行,而且无意人为的干扰可能导致回放的失败

    4. WR对Java的支持也不如QTP那么强

    WinRunner vs. QuickTest Pro

    Quick Comparison


     



    Overview

    Today Mercury has two functional testing tools – WinRunner (WR) and QuickTest Professional (QTP). WinRunner has been around since about 1995 while QuickTest Pro has been available since about 2002. We have lots of companies asking us “What’s the difference between WinRunner and QuickTest Pro?” and “If they are both functional testing tools from the same company, then which one of the tools should we use?” This document was developed as a short simple reference in helping to understand the basics about the tools in order to answer these two questions.

    Mercury’s position on the two tools is this:

    The strategic direction for Mercury and its customers for Functional Testing is product integration. The new releases of QTP and WR improve already existing integration where customers can leverage complete WinRunner assets (scrīpts/functions) from QuickTest Pro without any modification to these assets.

    QuickTest Pro 8 has recently been released and WinRunner version 8.0 is planned for November 2004. There are no plans to phase out WinRunner.

    QuickTest Pro remains Mercury’s prime product for best customer satisfaction and experience. For customers who need both products, Mercury continues to offer Mercury Functional Testing as a combined package of both product offerings. The Business Process Testing system will be extended to incorporate components designed in WinRunner for the WinRunner 8.0 release in November.



    WinRunner Compared to QuickTest Pro

    Environment Coverage Comparison:

    Common environments shared by both WinRunner and QuickTest Pro:

    Web-Related Environments

    IE, Netscape, AOL

    JDK, Java Foundation Classes, AWT

    Symantec Visual Café

    ActiveX Controls

    ERP/CRM

    Oracle: Jinitiator, 11i, NCA

    Custom Client Server

    Windows

    C++/C

    Visual Basic

    Operating Systems

    Windows 98, 2000, NT, ME, XP

    Legacy

    3270, 5250 Emulators

    VT100

    WinRunner Only Environments:

    Custom Client/Server

    PowerBuilder

    Forte

    Delphi

    Centura

    Stingray

    SmallTalk

    ERP/CRM

    Baan

    PeopleSoft Windows

    Siebel 5, 6 GUI Clients

    Oracle GUI Forms

    QuickTest Pro Only Environments:

    ERP/CRM

    SAP

    Siebel 7.x

    PeopleSoft 8.x

    .Net

    WinForms

    WebForms

    .Net controls

    Web Services

    XML, HTTP

    WSDL, SOAP

    J2EE, .Net

    Multimedia

    RealAudio/Video

    Flash

    Feature Comparison:

    Common features found in both WinRunner and QuickTest Pro:

    Record/Replay

    ODBC & Excel Connectivity

    Code Editor & Debugger

    Recovery Manager

    Shared Object Repository

    Rapid Object Import

    Numerous Checkpoints

    Analog

    scrīpt & Function Libraries

    WinRunner Only Environments:

    Function Generator

    Database Integration

    Run Wizard

    TSL

    MDI

    QuickTest Pro Only Environments:

    ActiveScreen

    TestGuard

    Tree View

    scrīptFusion

    Data Table

    VBscrīpt

    Function Generator*

    (coming in v7.0)

    Run Wizard*

    (coming in v7.0)



    What We Recommend

    QuickTest Pro is our functional testing tool of choice!

    Most customers are in either of two situations:

    Existing WinRunner customers asking “Should we switch to QuickTest Pro?”

    New customers asking “Which should we get, WinRunner or QuickTest Pro?”

    We have been implementing Mercury’s products since 1992 and have senior level expertise in WinRunner. We have been implementing WinRunner since the very first version of it. So like many existing WinRunner customers we have a huge knowledge investment in WinRunner ourselves. However we have worked on the Mercury development team on the QuickTest Pro 6.0 and 6.5 releases, and have solid real-world experience in implementing QuickTest Pro since the 6.0 release. We have found it to be a great tool to use and recommend it to all customers! Overall, we recommend using QuickTest Pro unless for some reason you have to use WinRunner due to an unsupported environment not existing in QuickTest Pro.

    Overall, QuickTest Pro is easier to use and implement for both technical and non-technical testers in comparison to WinRunner. QTP offers many features that are found in WinRunner, but are easier to use. QTP also offers many features not found in WinRunner that make test scrīpt creation, enhancement and maintenance easier.

    Let’s quickly discuss some key issues:

    The WinRunner interface forces the user to look directly at TSL code. TSL is the WinRunner programming language developed by Mercury. It is based on the “C” programming language and therefore looks very similar. For testers who do not have a technical background, they are not always comfortable with having to always look at code. However QuickTest Pro offers a “Tree View” which is an icon-based view of the scrīpt. This is very easy to get used to and non-technical people adapt to it quicker and feel more comfortable working with it. For the technical user, they can always switch over to the “Expert View” in QuickTest and look directly at code, and program away using VBscrīpt.

     

    WinRunner uses TSL which is a proprietary language of Mercury. These types of languages can be very restrictive and you are limited on available resources. QuickTest Pro use the Microsoft programming language VBscrīpt which is very powerful, has lots of capabilities and there are lots of resources available.

     

    We feel that there are many more “point and click” features in QuickTest Pro than WinRunner. This makes its use easier.

    All the same features found in WinRunner are found in QuickTest Pro plus more.

    Data Table integration is much easier and simpler with QuickTest Pro.

    Data Driven Testing is easier with more options in QuickTest Pro.

    scrīpt enhancements are typically easier with QuickTest Pro because it has the Active Screen where the windows and objects in your application are captured for later use. Using a “point and click” capability you can easily interface with objects, their definitions and create checkpoints after having recorded a scrīpt – without having to navigate back to that location in your application like you have to with WinRunner. This greatly speeds up scrīpt development.

    QuickTest Pro currently has built in integration with WinRunner in order to be able to call existing scrīpts, which is great for customers who already have a large test scrīpt investment with WinRunner. Likewise WinRunner 8.0 is to have the ability to also call QuickTest Pro scrīpts. This eases the transition from WinRunner to QuickTest Pro for existing customers.

    Parameterization is much easier in QuickTest Pro and basically anything in QuickTest Pro can be parameterized (statements, checkpoints and the Object Repository).

    Capturing various output values is easier and simpler with QuickTest Pro. Using this capability with parameterization enables you to easily develop scrīpts that can do more in regards to testing.

    We have been implementing QuickTest Pro in real-world environments and have found it much easier to use, advance features are easier to implement and the scrīpt development is quicker. We really enjoy using QuickTest Pro and highly recommend it as the functional testing tool to use.

    QuickTest Pro is our functional testing tool of choice!



    WinRunner

    Summary:

    This product is a mature tool that has been around since approximately 1995. It interfaces with most of the leading development toolkits using the WindowsAPI and toolkit DLLs to interface with the “Application Under Test”.

    WinRunner offers a recording feature that will watch the individual tester and generate a test scrīpt to simulate the same actions just performed. The scrīpt is displayed as a program which can be enhanced with checkpoints, logic and special coding/programming.

    WinRunner also has integration with Excel spreadsheets for data driven testing and the ability to write data out in Excel format or in simple text files.

    Here is the descrīption from the Mercury “Features and Benefits” section of the WinRunner web page:

    Significantly increase power and flexibility of tests without any programming: The Function Generator presents a quick and error-free way to design tests and enhance scrīpts without any programming knowledge. Testers can simply point at a GUI object, and WinRunner will examine it, determine

  • 上班两个月了

    2007-07-13 13:40:01

    上班两个月了,感觉还可以,就是时间过得有点快,人家都说难熬的上班时间,我就一周一周的过来了。可能最近比较忙吧。

    终于有了自己的一个空间了,呵呵,作为一个学计算机的,这么久没有自己的空间,有点说不过去,现在好了。

  • 终于能录脚本了

    2007-07-13 13:15:50

    折腾了一个星期,不能录制脚本的问题终于解决了,居然是7.8的问题,换上8.1就ok了,爽啊!
    详细信息在论坛上

    http://bbs.51testing.com/thread-82186-1-1.html

数据统计

  • 访问量: 7131
  • 日志数: 12
  • 图片数: 2
  • 文件数: 2
  • 书签数: 1
  • 建立时间: 2007-06-27
  • 更新时间: 2007-08-03

RSS订阅

Open Toolbar