load runner 入门


LoadRunner,是一种预测系统行为和性能的负载测试工具。通过以模拟上千万用户实施并发负载及实时性能监测的方式来确认和查找问题,LoadRunner能够对整个企业架构进行测试。企业使用LoadRunner能最大限度地缩短测试时间,优化性能和加速应用系统的发布周期。 LoadRunner可适用于各种体系架构的自动负载测试,能预测系统行为并评估系统性能。

主要功能包括:
虚拟用户
真实负载
定位性能
分析结果
重复测试


LR的核心组件

LR 的组件很多,其中最核心的组件包括:

  • Vuser Generator(VuGen) 用于捕获最终用户业务流程和创建自动性能测试脚本
  • Controller 用于组织、驱动、管理和监控负载测试。
  • Load Generator 负载生成器用于通过运行虚拟用户生成负载。
  • Analysis 有助于您查看、分析和比较性能结果。


loadrunner的基本工作流程

https://i-blog.csdnimg.cn/blog_migrate/738984c6d26229973ec34016fd7d0459.png


loadrunner的基本架构:



loadrunner 是通过创建大量的虚拟用户来代替真实的用户操作客户端,比如浏览器发送HTTP用户请求到IIS 或者Apache web server。 大量来自虚拟用户客户端的需求是通过load generators 来生成的,这样就在不同的测试server上创建了大量的load
这些load生成器的agent的启动和停止是通过controller 程序,controller则是通过testing scenarios来控制测试的运行,同时在此过程中注入脚本和相关的运行配置

脚本可以通过"Virtual user script Generator" (named "V U Gen")来录制,通常会生成C语言脚本的代码。如果是对于java的客户端,则可以通过hooking JVM的客户端来录制

在运行的过程中所有server的状态都是通过controller来控制的。在测试结束的时候,controller 将monitoring的log和load generator的log合并,并提供给analysis program来分析,最后转化为图形和报告,报告的形式可以是word,crystal report或者html的形式


loadrunner相关的术语:

LoadRunner Terminology

TermDescription
Transaction

You define transactions to measure the performance of your system. A transaction is a set of end-user actions that represent typical application activity. For example: Log in, navigate to a search dialog, enter a search string, click the search button, and log out. 终端用户操作行为的集合

Business ProcessA sequence of steps in your application that represent a use case or a business function. It includes one or more transactions. For example: Searching a product catalog, booking a flight, or placing an order.
ScenarioA collection of business processes. A scenario defines the events that occur during a testing session, based on performance requirements. For example, a scenario might include a combination of "Create new account", "Search for flight", and "Purchase ticket" business processes.具体的业务场景
Virtual Users or VusersVusers emulate the actions of human users working on your system. A scenario can contain tens, hundreds, or even thousands of Vusers. 虚拟用户
Vuser ScriptThe recorded actions of a business process performed in your application. 基于业务需求所录制的脚本
Protocol

The method of communication between a client and the server. server和client之间的通信协议,https,soap等

Script footprint

The script footprint is defined by the quantities of the various load generator resources that are required to execute the Vuser script. Typical resources include memory, CPU power, and disk space.简单的说就是测试所需要的各种资源,CPU,内存,Disk等



loadtest的基本流程:


load test的计划:定义性能测试的基本需求,如并发用户数,典型的用户场景,要求的相应时间
创建Vuser的脚本: 使用VuGen来录制终端用户的行为并形成脚本
定义场景: 使用controller来设置load设置的环境
运行测试: 利用controller来驱动,管理,监控load测试
分析结果


评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

惹不起的程咬金

来都来了,不赏点银子么

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值