loadrunner基本使用流程及结果分析(图文).docx
二、 创建场景
1. 在 vugen 中点击图中按钮创建场景
2. 弹出编辑框,设置场景,设置完成后点击 ok 第一个是目标场景 第二个是手动场景 其中手动场景可以设置加载虚拟用户数
3. 双击这里选着加压主机
4. 选择主机 ip,和系统
5. 点击 ok 关闭对话框 图中红色区域是选着场景执行方式:模拟真是环境还是基于时间表模拟
Duration(持续时间):了解该测试过程持续时间.测试人员本身要对这个时期内系统一共 做了多少的事有大致的熟悉了解.以确定下次增加更多的任务条件下测试的持续时间。
Statistics Summary(统计摘要):只是大概了解一下测试数据,对我们具体分析没有太大的 作用.
Transaction Summary(事务摘要):了解平均响应时间 Average 单位为秒.
点击图上.右键选择 merge graphs.然后在 select graph to merge with 中选择即将用来进 行比较的 graph.如图 3:
图3
图 2 中较深颜色的是平均响应时间,浅色的为集合点,当 Vuser 在集合点持续了 1 分后平 均响应时间呈现最大值,可见用户的并发对系统的性能是一个很大的考验.接下来看一下与事 务有关的参数分析.下看一张图.
6. 下图中: 1) Schedule by 选项表示加载方式,基于脚本还是基于组 2) Run mode 表示加载模式:分别表示模拟真实情况和还是基于场景
7. 双击下图红色区域,可选着加压力度
8. 双击红色区域,可设置压力下完运行时间
9. 双击下面红色的内容,可以选着虚拟用户停止的模式
10. 弹出设置选项框,可以选着停止的方式 全部一下停止 每多少时间停止多少个的方式停止
16. 经 15 后,弹出选项框,点击 add 可以输入主机信息
17. 设置 ip 欺骗
三、 结果分析
1. 点击下面按钮,进入分析结果界面 2. 分析界面如下:
3. 点击这里的图表可以查看各结果的,然后对结果进行分析
4. 按照如下操作可以增加新的图表 5. 右键图表选着合并图表,可以合并分析
6. 合并后的图表
具体实例教你如何做 LoadRunner 结果分析
LoadRunner 最重要也是最难理解的地方--测试结果的分析.其余的录制和加压测试等设 置对于我们来讲通过几次操作就可以轻松掌握了.针对 Results Analysis 我用图片加文字做 了一个例子,希望通过例子能给大家更多的帮助.这个例子主要讲述的是多个用户同时接管任 务,测试系统的响应能力,确定系统瓶颈所在.客户要求响应时间是 1 个人接管的时间在 5S 内.
图1
可以看到大概在 3 分 50 的地方 30 个用户才全部集中到 start 集合点,持续了 3 分多, 在 7 分 30 的位置开始释放用户,9 分 30 还有 18 个用户,11 分 10 还有 5 个用户,整个过程 持续了 12 分.
图2
上面图 2 是集合点与平均事务响应时间的比较图.
注:在打开 analysis 之后系统 LR 默认这两个曲线是不在同一张图中的.这就需要自行设 置了.具体步骤如下:
其余的看不看都可以.都不是很重要. 【注】 51Testing 授权 IT168 独家转载,未经明确的书面许可,任何人或单位不得对本文内 容复制、转载或进行镜像,否则将追究法律责任。 内容导航
4.分析集合点
在录制脚本中通常我们会使用到集合点,那么既然我们用到了集合点,我们就需要知道 Vuser 是在什么时候集合在这个点上,又是怎样的一个被释放的过程.这个时候就需要观察 Vuser-Rendezvous(集合点) 图.
11. 弹出的参数话界面 一般回放设置下这里就好
12. 点击图中图表设置参数化 13. 弹出的设置界面,主要设置红色区域的几个地方
14. 下图按钮为脚பைடு நூலகம்调试
15. 下图按钮为设置时间的其实点和结束点的按钮 16. 下图两个按钮分别为与 hp 质量管理工具 ALM 连接按钮和创建场景按钮
17.插入事件,分别表示时间的开始和结束 事件插入成功: 18. 设置集合点
一、 录制脚本
1. 打开 2. 点击编辑脚本
3. 点击按钮新建脚本
4. 弹出对话框,选着 web(http/html)
5. 输入网址,点击 ok 6. 录制脚本,录制结束后,点击一下按钮停止录制
7. 录制成功后,生成脚本
8. 点击如下按钮回放脚本 9. 点此按钮,可新增 action
10. 点此按钮可以进行录制和回放设置
2.系统资源:
2.1 硬件环境:
CPU:奔四 2.8E
硬盘:100G 网络环境:100Mbps 2.2 软件环境: 操作系统:英文 windowsXP 服务器:tomcat 服务 浏览器:IE6.0 系统结构:B/S 结构 3.添加监视资源 下面要讲述的例子添加了我们平常测试中最常用到的一些资源参数.另外有些特殊的资 源暂时在这里不做讲解了.我会在以后相继补充进来。 Mercury Loadrunner Analysis 中最常用的 5 种资源. 1. Vuser 2. Transactions 3. Web Resources 4. Web Page Breakdown 5. System Resources 在 Analysis 中选择“Add graph”或“New graph”就可以看到这几个资源了.还有其他没有数 据的资源,我们没有让它显示.
11. 点击 run,来到执行界面
12. 在执行界面点击 start Scenario,开始跑场景
13. 下图为执行过程中
14. 场景跑完后显示如图界面: 其中右边红色区域是运行过程中监控服务器的资源占用率等等的一些信息,在左边还可 以添加或查看其他的一些图标
15. 点击下面按钮也能添加加压主机
如果想查看更多的资源,可以将左下角的 display only graphs containing data 置为不选.然 后选中相应的点“open graph”即可.
打开 Analysis 首先可以看的是 Summary Report.这里显示了测试的分析摘要.应有尽有. 但是我们并不需要每个都要仔细去看.下面介绍一下部分的含义:
loadrunner操作文档
首先安装loadrunner,并对loadrunner破解。
Loadrunner包含哪些组件1.vitual user generator 录制最终用户业务流程并创建自动化性能测试脚本,即Vuser脚本2.controller 组织,驱动,管理并监控负载测试3.load generator 通过运行vuser产生负载4.analyst 用于查看剖析和比较性能结果uncher 使可以通过单个访问点访问所有loadrunner组件负载测试流程:1.规划负载测试定义性能测试要求,例如并发用户数量,典型业务流程和要求的响应时间2.创建vuser脚本在自动化脚本中录制最终用户活动3.定义场景在loadrunner controller设置负载测试环境4.运行场景驱动,管理,并监控负载测试5.分析结果创建图和报表并评估性能Loadrunner功能1.创建脚本vitual user generator(VuGen) vuser以一种可重复,可预测的方式模拟典型用户操作。
在测试环境中,loadrunner在物理计算机上使用vuser代替实际用户。
如创建一个模拟用户登录-新建流程-退出系统的脚本,按如下步骤操作:选择创建脚本选择new scripts选择web脚本URL Address修改为需要做压力测试的OA访问地址Record into Action修改为vuser_initInit只在初始化时运行点ok之后会弹出IE。
加载完成后修改为Action提交流程后,修改为vuser_end,点击退出系统点击stop后会自动生成脚本。
在脚本中找到lr_think_time,并删除。
如不删除,脚本运行到此处时会等待相应时间。
2.设计脚本执行选择运行脚本选择刚创建的脚本运行设置Start指定起始并发数第三行设置每隔一段时间新加指定数量的并发人数(每15秒新增2个)Duration设置运行时间Stop vuser设置到时间之后退出系统的顺序3.运行负载测试在运行选项卡中,单击开始场景按钮,将出现controller运行视图4.监控负载测试a)查看默认图形默认情况下,controller显示“正在运行vuser图”,事务响应时间,每秒点击次数。
loadrunner使用说明
目录第一部分:Loadrunner的简介----------------------------------------------------------------------------------- 21.为什么应进行自动性能测试? ----------------------------------------------------------------------- 22. LoadRunner 简介:------------------------------------------------------------------------------------- 22.1 应用程序负载测试------------------------------------------------------------------------------ 22.2 手动测试的局限性------------------------------------------------------------------------------ 22.3 LoadRunner 解决方案------------------------------------------------------------------------- 33. LoadRunner 组成:------------------------------------------------------------------------------------- 34. LoadRunner 术语:------------------------------------------------------------------------------------- 35. LoadRunner测试流程: ------------------------------------------------------------------------------- 45.1 步骤1:计划测试-------------------------------------------------------------------------------- 55.2 步骤2:创建Vuser脚本 ---------------------------------------------------------------------- 55.3 步骤3:创建场景-------------------------------------------------------------------------------- 55.4 步骤4:运行场景-------------------------------------------------------------------------------- 55.5 步骤5:监控场景-------------------------------------------------------------------------------- 65.6 步骤6:分析测试结果 ------------------------------------------------------------------------- 6 第二部分:Loadrunner安装------------------------------------------------------------------------------------- 61. 系统要求 -------------------------------------------------------------------------------------------------- 62. 安装过程 -------------------------------------------------------------------------------------------------- 6 第三部分:Loadrunner的具体操作: ------------------------------------------------------------------------ 10 1.Virtual User Generator -------------------------------------------------------------------------------- 101.1 录制用户脚本----------------------------------------------------------------------------------- 111.2 完善脚本----------------------------------------------------------------------------------------- 151.3 Run Time Setting ----------------------------------------------------------------------------- 251.4 运行测试脚本----------------------------------------------------------------------------------- 281.5 VuGen中其他有用功能------------------------------------------------------------------------ 292.LoadRunner Controller -------------------------------------------------------------------------------- 302.1 创建运行场景----------------------------------------------------------------------------------- 312.2 分析及监视运行场景 ------------------------------------------------------------------------- 433.Analysis:----------------------------------------------------------------------------------------------- 533.1 分析事务的响应时间 ------------------------------------------------------------------------- 533.2 虚拟用户图表----------------------------------------------------------------------------------- 583.3 关联分析----------------------------------------------------------------------------------------- 593.4 测试报告----------------------------------------------------------------------------------------- 59 Q&A ----------------------------------------------------------------------------------------------------------------- 61第一部分:Loadrunner的简介1.为什么应进行自动性能测试?自动性能测试是一项规范,它利用有关产品、人员和过程的信息来减少应用程序、升级程序或修补程序部署中的风险。
软件测试案例分析 实验二、Loadrunner基本操作
实验二 Loadrunner基本操作姓名:学号:一、实验目的(1)理解和掌握性能测试的基本原理和方法。
(2)掌握LR录制模式的选择与使用。
二、实验要求(1)运用LR录制登陆脚本,完成订票操作。
(2)回放脚本,观察结果。
(3)对脚本进行参数化。
三、实验内容(1)打开http://localhost/MercuryWebTours/订票页面,注册用户mike/mountain, jack/johnson,两个用户;(2)使用LR录制http://localhost/MercuryWebTours/订票页面的登录功能,对登录名和密码参数化,数据文件的数据如下:Username Passwordjojo beanjoe youngmike mountainjack johnson(3)将runtime settings中的run logic的循环次数设置为4;(4)将runtime settings中的log配置,选择extended log,且选中parameter substitution (5)回放脚本,在execution log中观察参数是否已经带入;(6)为登录就脚本设置一个事物,名称为”login transaction”(7)在实验报告中,记录每次的操作步骤及界面截图,保存execution log的执行日志。
四、实验结果:操作步骤及界面截图execution log的执行日志Virtual User Script startedStarting action vuser_init.Web Turbo Replay of LoadRunner 7.80.0 for WINXP; Web build 2271 [MsgId:MMSG-27143]Run-Time Settings file: "C:\Documents and Settings\Administrator\Local Settings\Temp\noname1\\default.cfg" [MsgId: MMSG-27141]Ending action vuser_init.Running Vuser...Starting iteration 1.Starting action Action.Action.c(7): Notify: Transaction login transaction started.Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/header.html" in "http://localhost/MercuryWebTours/" [MsgId: MMSG-26574]Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/welcome.pl?signOff=true" in "http://localhost/MercuryWebTours/" [MsgId: MMSG-26574]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/banner_animated.gif" in HTML "http://localhost/MercuryWebTours/header.html" [MsgId: MMSG-26659]Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/nav.pl?in=home" in "http://localhost/MercuryWebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574] Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/home.html" in "http://localhost/MercuryWebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574] Action.c(9): Found resource "http://localhost/MercuryWebTours/images/banner_merctur.jpg" in HTML "http://localhost/MercuryWebTours/home.html" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/sun_swede.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/login.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/signup.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/admin.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): web_url was successful, 51022 body bytes, 2171 header bytes [MsgId:MMSG-27176]Action.c(18): Submitting form to "http://localhost/MercuryWebTours/login.pl", Target Frame="body" [MsgId: MMSG-27978]Action.c(18): Detected non-resource "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" in "http://localhost/MercuryWebTours/login.pl" [MsgId: MMSG-26574]Action.c(18): Detected non-resource "http://localhost/MercuryWebTours/login.pl?intro=true" in "http://localhost/MercuryWebTours/login.pl" [MsgId: MMSG-26574]Action.c(18): Found resource "http://localhost/MercuryWebTours/images/sun_with_logo.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId:MMSG-26659]Action.c(18): Found resource "http://localhost/MercuryWebTours/images/flights.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Found resource "http://localhost/MercuryWebTours/images/itinerary.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659]Action.c(18): Found resource "http://localhost/MercuryWebTours/images/in_home.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Found resource "http://localhost/MercuryWebTours/images/signoff.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Resource "http://localhost/MercuryWebTours/images/banner_merctur.jpg" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(18): web_submit_form was successful, 12483 body bytes, 1693 header bytes [MsgId: MMSG-27176]Action.c(27): Image-linking to "http://localhost/MercuryWebTours/welcome.pl?signOff=1", Target Frame="body" [MsgId: MMSG-27993]Action.c(27): Detected non-resource "http://localhost/MercuryWebTours/nav.pl?in=home" in "http://localhost/MercuryWebTours/welcome.pl?signOff=1" [MsgId: MMSG-26574] Action.c(27): Detected non-resource "http://localhost/MercuryWebTours/home.html" in "http://localhost/MercuryWebTours/welcome.pl?signOff=1" [MsgId: MMSG-26574] Action.c(27): Resource "http://localhost/MercuryWebTours/images/banner_merctur.jpg" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/sun_swede.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/login.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/signup.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/admin.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): web_image was successful, 2366 body bytes, 698 header bytes [MsgId:MMSG-27176]Action.c(33): Notify: Transaction login transaction ended with Pass status (Duration: 1.3461). Ending action Action.Ending iteration 1.Starting iteration 2.Starting action Action.Action.c(7): Notify: Transaction login transaction started.Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/header.html" in "http://localhost/MercuryWebTours/" [MsgId: MMSG-26574]Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/welcome.pl?signOff=true" in "http://localhost/MercuryWebTours/" [MsgId: MMSG-26574]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/banner_animated.gif" in HTML "http://localhost/MercuryWebTours/header.html" [MsgId: MMSG-26659]Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/nav.pl?in=home" in "http://localhost/MercuryWebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574] Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/home.html" in "http://localhost/MercuryWebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574] Action.c(9): Found resource "http://localhost/MercuryWebTours/images/banner_merctur.jpg" in HTML "http://localhost/MercuryWebTours/home.html" [MsgId: MMSG-26659]"http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/login.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/signup.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/admin.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): web_url was successful, 51018 body bytes, 2171 header bytes [MsgId:MMSG-27176]Action.c(18): Submitting form to "http://localhost/MercuryWebTours/login.pl", Target Frame="body" [MsgId: MMSG-27978]Action.c(18): Detected non-resource "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" in "http://localhost/MercuryWebTours/login.pl" [MsgId: MMSG-26574]Action.c(18): Detected non-resource "http://localhost/MercuryWebTours/login.pl?intro=true" in "http://localhost/MercuryWebTours/login.pl" [MsgId: MMSG-26574]Action.c(18): Found resource "http://localhost/MercuryWebTours/images/sun_with_logo.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId:MMSG-26659]Action.c(18): Found resource "http://localhost/MercuryWebTours/images/flights.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Found resource "http://localhost/MercuryWebTours/images/itinerary.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Found resource "http://localhost/MercuryWebTours/images/in_home.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Found resource "http://localhost/MercuryWebTours/images/signoff.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Resource "http://localhost/MercuryWebTours/images/banner_merctur.jpg" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(18): web_submit_form was successful, 12482 body bytes, 1688 header bytes [MsgId: MMSG-27176]Action.c(27): Image-linking to "http://localhost/MercuryWebTours/welcome.pl?signOff=1", Target Frame="body" [MsgId: MMSG-27993]Action.c(27): Detected non-resource "http://localhost/MercuryWebTours/nav.pl?in=home" in "http://localhost/MercuryWebTours/welcome.pl?signOff=1" [MsgId: MMSG-26574] Action.c(27): Detected non-resource "http://localhost/MercuryWebTours/home.html" in "http://localhost/MercuryWebTours/welcome.pl?signOff=1" [MsgId: MMSG-26574] Action.c(27): Resource "http://localhost/MercuryWebTours/images/banner_merctur.jpg" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/sun_swede.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/login.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/admin.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): web_image was successful, 2367 body bytes, 698 header bytes [MsgId:MMSG-27176]Action.c(33): Notify: Transaction login transaction ended with Pass status (Duration: 1.3192). Ending action Action.Ending iteration 2.Starting iteration 3.Starting action Action.Action.c(7): Notify: Transaction login transaction started.Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/header.html" in "http://localhost/MercuryWebTours/" [MsgId: MMSG-26574]Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/welcome.pl?signOff=true" in "http://localhost/MercuryWebTours/" [MsgId: MMSG-26574]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/banner_animated.gif" in HTML "http://localhost/MercuryWebTours/header.html" [MsgId: MMSG-26659]Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/nav.pl?in=home" in "http://localhost/MercuryWebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574] Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/home.html" in "http://localhost/MercuryWebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574] Action.c(9): Found resource "http://localhost/MercuryWebTours/images/banner_merctur.jpg" in HTML "http://localhost/MercuryWebTours/home.html" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/sun_swede.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/login.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/signup.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/admin.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): web_url was successful, 51021 body bytes, 2171 header bytes [MsgId:MMSG-27176]Action.c(18): Submitting form to "http://localhost/MercuryWebTours/login.pl", Target Frame="body" [MsgId: MMSG-27978]Action.c(18): Detected non-resource "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" in "http://localhost/MercuryWebTours/login.pl" [MsgId: MMSG-26574]Action.c(18): Detected non-resource "http://localhost/MercuryWebTours/login.pl?intro=true" in "http://localhost/MercuryWebTours/login.pl" [MsgId: MMSG-26574]Action.c(18): Found resource "http://localhost/MercuryWebTours/images/sun_with_logo.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId:MMSG-26659]"http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Found resource "http://localhost/MercuryWebTours/images/itinerary.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Found resource "http://localhost/MercuryWebTours/images/in_home.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Found resource "http://localhost/MercuryWebTours/images/signoff.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Resource "http://localhost/MercuryWebTours/images/banner_merctur.jpg" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(18): web_submit_form was successful, 12483 body bytes, 1635 header bytes [MsgId: MMSG-27176]Action.c(27): Image-linking to "http://localhost/MercuryWebTours/welcome.pl?signOff=1", Target Frame="body" [MsgId: MMSG-27993]Action.c(27): Detected non-resource "http://localhost/MercuryWebTours/nav.pl?in=home" in "http://localhost/MercuryWebTours/welcome.pl?signOff=1" [MsgId: MMSG-26574] Action.c(27): Detected non-resource "http://localhost/MercuryWebTours/home.html" in "http://localhost/MercuryWebTours/welcome.pl?signOff=1" [MsgId: MMSG-26574] Action.c(27): Resource "http://localhost/MercuryWebTours/images/banner_merctur.jpg" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/sun_swede.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/login.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/signup.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/admin.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): web_image was successful, 2367 body bytes, 698 header bytes [MsgId:MMSG-27176]Action.c(33): Notify: Transaction login transaction ended with Pass status (Duration: 1.3043). Ending action Action.Ending iteration 3.Starting iteration 4.Starting action Action.Action.c(7): Notify: Transaction login transaction started.Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/header.html" in "http://localhost/MercuryWebTours/" [MsgId: MMSG-26574]Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/welcome.pl?signOff=true" in "http://localhost/MercuryWebTours/" [MsgId: MMSG-26574]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/banner_animated.gif" in HTML "http://localhost/MercuryWebTours/header.html" [MsgId: MMSG-26659]Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/nav.pl?in=home" in "http://localhost/MercuryWebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574]Action.c(9): Detected non-resource "http://localhost/MercuryWebTours/home.html" in "http://localhost/MercuryWebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574] Action.c(9): Found resource "http://localhost/MercuryWebTours/images/banner_merctur.jpg" in HTML "http://localhost/MercuryWebTours/home.html" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/sun_swede.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/login.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/signup.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): Found resource "http://localhost/MercuryWebTours/images/admin.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]Action.c(9): web_url was successful, 51013 body bytes, 2171 header bytes [MsgId:MMSG-27176]Action.c(18): Submitting form to "http://localhost/MercuryWebTours/login.pl", Target Frame="body" [MsgId: MMSG-27978]Action.c(18): Detected non-resource "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" in "http://localhost/MercuryWebTours/login.pl" [MsgId: MMSG-26574]Action.c(18): Detected non-resource "http://localhost/MercuryWebTours/login.pl?intro=true" in "http://localhost/MercuryWebTours/login.pl" [MsgId: MMSG-26574]Action.c(18): Found resource "http://localhost/MercuryWebTours/images/sun_with_logo.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId:MMSG-26659]Action.c(18): Found resource "http://localhost/MercuryWebTours/images/flights.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Found resource "http://localhost/MercuryWebTours/images/itinerary.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Found resource "http://localhost/MercuryWebTours/images/in_home.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Found resource "http://localhost/MercuryWebTours/images/signoff.gif" in HTML "http://localhost/MercuryWebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659] Action.c(18): Resource "http://localhost/MercuryWebTours/images/banner_merctur.jpg" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(18): web_submit_form was successful, 12483 body bytes, 1636 header bytes [MsgId: MMSG-27176]Action.c(27): Image-linking to "http://localhost/MercuryWebTours/welcome.pl?signOff=1", Target Frame="body" [MsgId: MMSG-27993]Action.c(27): Detected non-resource "http://localhost/MercuryWebTours/nav.pl?in=home" in "http://localhost/MercuryWebTours/welcome.pl?signOff=1" [MsgId: MMSG-26574] Action.c(27): Detected non-resource "http://localhost/MercuryWebTours/home.html" in "http://localhost/MercuryWebTours/welcome.pl?signOff=1" [MsgId: MMSG-26574] Action.c(27): Resource "http://localhost/MercuryWebTours/images/banner_merctur.jpg" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/sun_swede.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/login.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/signup.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): Resource "http://localhost/MercuryWebTours/images/admin.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]Action.c(27): web_image was successful, 2359 body bytes, 698 header bytes [MsgId:MMSG-27176]Action.c(33): Notify: Transaction login transaction ended with Pass status (Duration: 1.4922). Ending action Action.Ending iteration 4.Ending Vuser...Starting action vuser_end.Ending action vuser_end.Vuser Terminated.。
loadrunner使用手册
一、引言1.1.简介loadrunner是一种预测系统行为和性能的负载测试工具,它可以轻松创建虚拟用户、创建真实的负载、定位性能问题、重复测试保证系统的高性能1.2.组成第一个Vuser Generator(c语言脚本开发的)第二个Controller(指挥官的作用)第三个Analysis(收集测试数据,进行结果分析的)1.3.文档说明本使用手册是结合公司河南专技在线学习压力测试过程而编写的二、使用说明2.1.安装1.请参考文档:loadrunner11安装破解说明.doc2.为其他的负载机子安装load Generator(负载机)2.2.使用(1)录制脚本并改写1.在本机的所有程序中打开Vuser Generator,如下图2.如下图,在弹出的窗口中,点击New Script按钮3.如下图,在弹出的窗口中,选择HTTP/HTML协议后点击Create按钮并打开url地址后,就可以进行脚本的录制了5.如下图,在进行操作完毕后,点击停止按钮,即可完成录制,loadrunner会自动生成c语言脚本6.如下图,即为loadrunner录制的脚本截图,录制的脚本自动在Action()中显示,我们可以参考录制脚本中客户端和服务器之间的数据交互,自己重新编写测试脚本(2)执行场景1.如下图,在本机的所有程序中打开Controller2.如下图,在弹出的窗口中点击Browser按钮,在弹出窗口选择脚本后点击OK3.如下图,新增负载机4.如下图,在弹出窗口执行下图操作5.如下图,验证负载机连接状态6.如下图,选择百分比模式,为了可以方便均衡分配负载机人数7.如下图,选择负载机和负载机人数8.如下图,设置5w人执行脚本,1s/20人的速度开始执行场景9.如下图,设置场景执行:一直运行,直到所有人脚本执行完毕10.如下图,点击按钮,弹出框点击确定,即可开始执行场景11.如下图,在切换至Run,可以查看运行过程中,所有Vuser运行情况和日志、事物执行的时间等1.场景执行完毕后,如下图,导出loadrunner报告2.如下图,为导出结果图例。
Loadrunner分析结果图说明
Loadrunner分析结果图说明1、Running Vusers图使用Vuser 图可以确定方案,执行期间Vuser 的整体行为。
X 轴表示从方案开始运行以来已用的时间。
Y 轴表示方案中的Vuser 数。
Vuser-Rendezvous 图主要反映Vuser 是在什么时候集合在这个点上,又是怎样的一个被释放的过程.图中可以看到在1分4秒的地方50个用户全部集中到达集合点,持续了5分48秒开始释放用户,整个过程持续了6分钟。
2、Hits per Second图“每秒点击次数”,即使运行场景过程中虚拟用户每秒向Web服务器提交的HTTP请求数。
通过它可以评估虚拟用户产生的负载量,如将其和“平均事务响应时间”图比较,可以查看点击次数对事务性能产生的影响。
通过对查看“每秒点击次数”,可以判断系统是否稳定。
系统点击率下降通常表明服务器的响应速度在变慢,需进一步分析,发现系统瓶颈所在。
3、Throughput图“吞吐率”显示的是场景运行过程中服务器的每秒的吞吐量。
其度量单位是字节,表示虚拟用在任何给定的每一秒从服务器获得的数据量。
可以依据服务器的吞吐量来评估虚拟用户产生的负载量,以及看出服务器在流量方面的处理能力以及是否存在瓶颈。
X 轴表示从方案开始运行以来已用的时间。
Y 轴表示服务器的吞吐量(以字节为单位)。
“吞吐率”图和“点击率”图的区别:“吞吐率”图,是每秒服务器处理的HTTP申请数。
“点击率”图,是客户端每秒从服务器获得的总数据量。
4、Transaction Summary图对事务进行综合分析是性能分析的第一步,通过分析测试时间内用户事务的成功与失败情况,可以直接判断出系统是否运行正常。
5、Average Transaction Response Time图“事务平均响应时间”显示的是测试场景运行期间的每一秒内事务执行所用的平均时间,通过它可以分析测试场景运行期间应用系统的性能走向。
例:随着测试时间的变化,系统处理事务的速度开始逐渐变慢,这说明应用系统随着投产时间的变化,整体性能将会有下降的趋势。
LoadRunner使用手册(word版)
LoadRunner 使用手册1 LoadRunner 概要介绍LoadRunner® 是一种预测系统行为和性能的工业标准级负载测试工具。
通过以模拟上千万用户实施并发负载及实时性能监测的方式来确认和查找问题,LoadRunner 能够对整个企业架构进行测试。
通过使用LoadRunner,企业能最大限度地缩短测试时间,优化性能和加速应用系统的发布周期。
目前企业的网络应用环境都必须支持大量用户,网络体系架构中含各类应用环境且由不同供应商提供软件和硬件产品。
难以预知的用户负载和愈来愈复杂的应用环境使公司时时担心会发生用户响应速度过慢,系统崩溃等问题。
这些都不可避免地导致公司收益的损失。
Mercury Interactive 的LoadRunner 能让企业保护自己的收入来源,无需购置额外硬件而最大限度地利用现有的IT 资源,并确保终端用户在应用系统的各个环节中对其测试应用的质量,可靠性和可扩展性都有良好的评价。
LoadRunner 是一种适用于各种体系架构的自动负载测试工具,它能预测系统行为并优化系统性能。
LoadRunner 的测试对象是整个企业的系统,它通过模拟实际用户的操作行为和实行实时性能监测,来帮助您更快的查找和发现问题。
此外,LoadRunner 能支持广范的协议和技术,为您的特殊环境提供特殊的解决方案。
1.1 轻松创建虚拟用户使用LoadRunner 的Virtual User Generator,您能很简便地创立起系统负载。
该引擎能够生成虚拟用户,以虚拟用户的方式模拟真实用户的业务操作行为。
它先记录下业务流程(如下订单或机票预定),然后将其转化为测试脚本。
利用虚拟用户,您可以在Windows ,UNIX或Linux 机器上同时产生成千上万个用户访问。
所以LoadRunner 能极大的减少负载测试所需的硬件和人力资源。
另外,LoadRunner 的TurboLoad 专利技术能提供很高的适应性。
Loadrunner基础使用手册
LoadRunner 基础使用手册使用Loadrunner对Web应用进行负载/压力测试。
LoadRunner 包含很多组件,其中最常用的有Visual User Generator(以下简称VuGen)、Controller,Analysis。
使用LoadRunner 进行测试的过程可以用下图表示:下面我就按照上图的步骤来简单说明使用LoadRunner 的测试过程。
1制定负载测试计划在任何类型的测试中,测试计划都是必要的步骤。
测试计划是进行成功的负载测试的关键。
任何类型的测试的第一步都是制定比较详细的测试计划。
一个比较好的测试计划能够保证LoadRunner 能够完成负载测试的目标。
制定负载测试计划一般情况下需要三个步骤,可以用下图表示:下面简单的对这三个过程进行介绍:1.1 分析应用程序制定负载测试计划的第一步是分析应用程序。
你应该对系统的软硬件以及配置情况非常的熟悉,这样才能保证你使用LoadRunner 创建的测试环境真实的反映实际运行的环境。
1.1.1确定系统的组成画出系统的组成图。
组成图要包括系统中所有的组件,以及相互之间是如何通讯的。
下面是一个系统组成图的例子,可以参考。
1.1.2描述系统配置画出系统组成图后,试着回答以下问题,对组成图进行完善。
1、预计有多少用户会连到系统2、客户机的配置情况(硬件、内存、操作系统、软件工具等)3、服务器使用什么类型的数据库以及服务器的配置情况4、客户机和服务器之间如何通讯5、还有什么组件会影响Response Time 指标(比如Modem 等)6、通讯装置(网卡、路由器等)的吞吐量是多少?每个通讯装置能够处理多少并发用户1.1.3分析最普遍的使用方法了解该系统最常用的功能,确定那些功能需要优先测试、什么角色使用该系统以及每个角色会有多少人、每个角色的地理分布情况等,从而预测负载的最高峰出现的情况。
1.2 确定测试目标(Defining Testing Objectives)这里借用一段文字来说明如何确定测试目标。
loadRunner使用图解
loadRunner测试基本步骤:录制脚本→脚本调试→加载脚本、设置参数→压力测试→测试完成、生成测试报告以某系统签到签退测试脚本为例:1、录制脚本运行loadRunner,点击create/edit scripts图1.1 loadRunner主界面—录制脚本点击弹出窗口的new Vuser script…按钮图1.2 脚本选择界面弹出选择脚本协议窗口,默认为web(HTTP/HTML),签到签退功能测试的类型是web,所以直接点击ok图1.3 协议选择界面在下图中,在URL Address中输入测试入口地址,输入完成后,点击ok,开始录制图1.4 录制脚本参数设置界面图1.5 点击ok后,弹出窗口,开始录制图中红色标识部分为脚本录制的阶段。
一共有三个:vuser_init(初始化)、Action (动作)、vuser_end(结束)以签到压力测试为例,我们要测试的动作为签到,初始化为用户登录,结束可以为用户退出,也可以为用户点一下其它按钮。
输入用户名、密码,登录系统图1.7 脚本录制—初始化阶段,登录完成。
登录完成后,初始化阶段完成,经红色标识部分调整为Action,开始动作部分—签到。
调整为Action后,开始录制动作。
在门户首页点击个人事务,点击签到点击确认,完成签到动作签到动作完成后,Action录制完成。
结束动作开始。
我们以点击一下沟通中心作为整个操作的结束,沟通中心页面加载完成后,点击结束按钮,脚本录制完成。
2、脚本调试点击下图中标识的按钮,进行脚本回放图2.1 脚本回放再次点击回放按钮图2.2 脚本回放完成后,再次点击回放按钮图2.3 系统参数比较先选择下方的参数,然后点击correlate,参数比较完成图2.4 点击查看脚本按钮图2.5 脚本中记录用户名密码参数的位置图2.6 脚本中其它参数的位置找到脚本中记录用户名密码参数的位置,替换为另一个人如wujq(将脚本中zhouyun 改为wujq),找到其它需要修改的参数的位置,如empId,由于员工一天只允许签一次到,所以empId是必须修改的(wujq的员工id为7942,所以empId部分修改为7942)。
LoadRunner使用说明
负载测试使用说明1. 打开运行 (2)2. 基本操作 (2)3. 创建负载测试脚本 (3)3.1. 新建脚本 (3)3.2. 录制并生成脚本 (5)4. 负载测试 (6)4.1. 打开负载测试界面 (6)4.2. 参数设置 (6)4.3. 运行测试 (7)4.4. 生成测试报告 (8)5. 常见问题解决方法 (9)5.1. 错误提示一:Cannot Save the license information (9)5.2. 错误提示二:LoadRunner Controller cannot create Vusers (10)1.打开运行安装成功后打开LoadRunner.exe,主界面如图1-1所示。
图1-12.基本操作主界面左上角是测试软件的基本操作,分为3个模块,如图2-1:图2-1从上而下依次为Create/Edit Script 创建/编辑脚本,创建空白的脚本文件并记录测试的过程,以便该使软件能够重复执行测试。
Run Load Tests 运行负载测试,用上面生成的脚本记录进行负载测试。
Analyze Test Results分析测试结果,对负载测试的结果警醒分析3.创建负载测试脚本要进行负载测试首先要创建脚本,那么我们就先点一下Create/Edit Scrip,弹出如图3-1所示:图3-1在左上角有一排按钮,这是创建脚本的基本操作如图:图3-2从左至右依次为New Script 新建空白脚本Open Existing Script 打开已存在的脚本Create Script From Template 根据模板创建脚本Protocol Advisor方案顾问(这个估计永远用不到所以无视)3.1.新建脚本点击New Script探出对话框,如图:图3-3这里可以创建各种类型的脚本,在左侧选取第二个New Multiple Protocol Script这次是测试网页的负载测试,那么我们选Web(HTTP/HTML) ,鼠标双击或按中间的黑色箭头把这一项加到右侧列表中,如下图所示,最后点击Create完成新建脚本操作。
LoadRunner工具操作手册文档
LoadRunner工具操作手册文档1.1 工具介绍 (1)1.2 使用好处 (1)1.3 安装过程 (1)1.4 实例讲解 (12)1.5 形成时间 (25)1.1 工具介绍LoadRunner 是一种预测系统行为和性能的负载测试工具。
通过以模拟上千万用户实施并发负载及实时性能检测的方式来确认和查找问题,LoadRunner能够对整个企业架构进行测试,通过使用LoadRunner企业能最大限度的缩短测试时间,优化性能和加速应用系统的发布周期,LoadRunner 是一种适用于各种体系架构的自动负载测试工具,它能预测系统行为并优化系统性能。
LoadRunner组件包括:虚拟用户生成器用于捕获最终用户业务流程和创建自动性能测试脚本.Controller 用于组织、驱动、管理和监控负载测试。
负载生成器用于通过欲行虚拟用户生负载。
Analysis有助于您查看、分析和比较性能结果。
Launcher 为访问所有LoadRunner 组件的统一界面。
1.2 使用好处LoadRunner既然是一款预测系统行为和性能的负载测试工具,它利用有关产品、人员和过程的信息来减少应用程序、升级程序和修补程序部署中的风险,自动性能测试的核心原理是通过将生产时的工作量应用于预部署系统来衡量系统性能和最终用户体检。
在使用过程中,它主要能为我们带来以下几点用处:应用程序是否能够很快的响应用户的要求。
应用程序是否能处理预期的用户负载并具有盈余能力。
应用程序是否能处理业务所需的事务数量。
应用程序在预期和非预期的用户负载下,应用程序是否稳定。
应用程序是否能确保用户在真正使用软件时获得积极的体验等。
1.3 安装过程LoadRunner 分为Windows 版本和Unix版本,如果所有测试环境基于Windows平台,那么只要安装Windows 版本即可。
系统要求:运行LoadRunner,内存最好在128M以上,LoadRunner11的最低要求。
