性能测试工具LoadRunner实验报告Word文件下载.docx

上传人:b****3 文档编号:17010993 上传时间:2022-11-27 格式:DOCX 页数:18 大小:489.05KB
下载 相关 举报
性能测试工具LoadRunner实验报告Word文件下载.docx_第1页
第1页 / 共18页
性能测试工具LoadRunner实验报告Word文件下载.docx_第2页
第2页 / 共18页
性能测试工具LoadRunner实验报告Word文件下载.docx_第3页
第3页 / 共18页
性能测试工具LoadRunner实验报告Word文件下载.docx_第4页
第4页 / 共18页
性能测试工具LoadRunner实验报告Word文件下载.docx_第5页
第5页 / 共18页
点击查看更多>>
下载资源
资源描述

性能测试工具LoadRunner实验报告Word文件下载.docx

《性能测试工具LoadRunner实验报告Word文件下载.docx》由会员分享,可在线阅读,更多相关《性能测试工具LoadRunner实验报告Word文件下载.docx(18页珍藏版)》请在冰豆网上搜索。

性能测试工具LoadRunner实验报告Word文件下载.docx

虚拟用户脚本生成器:

捕获最终用户业务流程和创建自动性能测试脚本,即我们在以后说的产生测试脚本;

压力产生器:

通过运行虚拟用户产生实际的负载;

用户代理:

协调不同负载机上虚拟用户,产生步调一致的虚拟用户;

压力调度:

根据用户对场景的设置,设置不同脚本的虚拟用户数量;

监视系统:

监控主要的性能计数器;

压力结果分析工具:

本身不能代替分析人员,但是可以辅助测试结果的分析。

1.2.2LoadRunner工具原理

代理(Proxy)是客户端和服务器端之间的中介人,LoadRunner就是通过代理方式截获客户端和服务器之间交互的数据流。

1)虚拟用户脚本生成器通过代理方式接收客户端发送的数据包,记录并将其转发给服务器端;

接收到从服务器端返回的数据流,记录并返回给客户端。

这样服务器端和客户端都以为在一个真实运行环境中,虚拟脚本生成器能通过这种方式截获数据流;

虚拟用户脚本生成器在截获数据流后对其进行了协议层上的处理,最终用脚本函数将数据流交互过程体现为我们容易看懂的脚本语句。

2)压力生成器则是根据脚本内容,产生实际的负载,扮演产生负载的角色。

3)用户代理是运行在负载机上的进程,该进程与产生负载压力的进程或是线程协作,接受调度系统的命令,调度产生负载压力的进程或线程。

4)压力调度是根据用户的场景要求,设置各种不同脚本的虚拟用户数量,设置同步点等。

5)监控系统则可以对数据库、应用服务器、服务器的主要性能计数器进行监控。

6)压力结果分析工具是辅助测试结果分析。

二、LoadRunner测试过程

2.1计划测试

定义性能测试要求,例如并发用户的数量、典型业务流程和所需响应时间等。

2.2创建Vuser脚本

将最终用户活动捕获(录制、编写)到脚本中,并对脚本进行修改,调试等。

协议类型:

取决于服务器端和客户端之间的通信协议;

脚本类型:

init(初始部分),Action(事务部分),end(退出结束);

脚本录制:

捕获应用程序所执行的操作;

验证回放:

检查是否准确模拟了录制的会话;

事务:

表示要度量的最终用户业务流程;

参数化:

将录制的一些常来替换为参数;

内容检查:

LR只检测到网页的响应,就认为是pass而不管当前网页的正确性,所以设置检查点,确保在测试时结果的正确性;

迭代次数:

action部分的循环次数。

2.3创建场景

对Vuser脚本进行场景设置和负载环境设置。

场景类型

手动场景:

通过定义Vuser组,Vuser脚本和运行脚本的负载生成器来创建场景;

百分比模式:

定义场景中要使用的Vuser总数,负载生成器计算机以及要分配给每个Vuser脚本的Vuser占总数的百分比。

面向目标的场景;

定义你希望的测试目标,LR会根据这些目标自动构建场景。

编辑计划:

设置加压方式、压力持续时间和减压方式等。

场景组:

选择组/脚本,虚拟用户数量以及负载生成器等。

运行时设置:

对脚本进行运行时属性设置。

三、实验过程

(1)安装完成进入Loadrunner主界面

(2)点击“Create/EditScripts”,启用后新建一个用户脚本,因为我们要测试的是Web应用所以如下所示,选择Web(HTTP/Html)协议

(3)点击Vuser下的StartRecording,出现如下界面:

输入URL地址,开始录制脚本。

Vuserinit是录制脚本的起始点;

Action是录制脚本的活动;

Suserend是录制脚本的终止点;

(4)脚本录制完之,点击Tools工具栏下的CreateControllerScenario…选项,会出现脚本的运行次数,确定后会出现如下界面:

此界面是规划脚本的开始数目,开始时间,驻留时间,退出时间,同时退出的数目等。

点击Editscheduler按钮出现如下所示界面;

1.RampUP

上图所示为每15秒运行5个脚本;

2.Duration

计划每个脚本的驻留时间;

3.RampDown

规定每隔多长时间退出多少数目;

点击OK,出现下图界面;

(5)开始压力负载测试:

图示数据只为说明,并不是实验真实数据

四、实验结果:

ExecutiveSummary

Objectives

Addtexthere

ScenarioSummary

TotalDuration(includingRampUp/Down):

10minutesand20seconds.

MaximumRunningVusers:

50

TotalThroughput(bytes):

TotalHits:

TopTime-ConsumingTransactions

TransactionName

Ave

90%

vuser_init_Transaction

0.189

0.675

vuser_end_Transaction

0.013

Action_Transaction

0.001

Conclusions

ScenarioConfiguration

Files

Name:

Scenario1

ResultsinSession:

C:

\DocumentsandSettings\Administrator\LocalSett

ings\Temp\noname3\res\res.lrr

SessionName:

Session1.lra

SchedulerInformation

StartedOn:

30-11-200814:

45:

08

EndedOn:

55:

29

Duration:

Runfor000:

05:

00(hhh:

mm:

ss)

LoadBehavior:

Start5Vusersevery00:

00:

15(hh:

Scripts

Script

Type

File

noname3

QTWeb

C:

\DocumentsandSettings\Administrator\LocalSettings\Temp\noname3\noname3.usr

RunTimeSettings

Group

Pacing

ThinkTime

NetworkSpeed

Browsercache

Assoonaspossible

Asrecorded

Maximumbandwidth

Yes

Users'

Influence

DisplaysaveragetransactionresponsetimesrelativetothenumberofVusersrunningatanygivenpointduringtheloadtest.ThisgraphhelpsyouviewthegeneralimpactofVuserloadonperformancetimeandismostusefulwhenanalyzingaloadtestwhichisrunwithagradualload.

Title:

TransactionResponseTimeUnderLoad

GraphType:

Correlate

BaseGraph:

RunningVusers

Additional:

AverageTransactionResponseTime

Granularity:

1Second

Color

Scale

Measurement

Min.

Ave.

Max.

SD

1

0.0

5.938

0.048

0.672

0.094

1.25

0.414

VuserLoadScheme

DisplaysthenumberofVusersthatexecutedVuserscripts,andtheirstatus,duringeachsecondofaloadtest.ThisgraphisusefulfordeterminingtheVuserloadonyourserveratanygivenmoment.

CurrentResults:

Filters:

VuserStatus=(Run)

GroupBy:

16Seconds

GraphMin.

GraphAve.

GraphMax.

GraphMedian

GraphSD

Run

22.8

50

20

16.742

TransactionResponseTimes

Displaystheaveragetimetakentoperformtransactionsduringeachsecondoftheloadtest.Thisgraphhelpsyoudeterminewhethertheperformanceoftheserveriswithinacceptableminimumandmaximumtransactionperformancetimerangesdefinedforyoursystem.

TransactionEndStatus=(Pass)

RunningVusers

TransactionSummary

Displaysthenumberoftransactionsthatpassed,failed,stopped,orendedwitherrors.

TransactionSummary

None

Pass

AverageTransactionResponseTime

Graph'

sMin.

sAve.

sMax.

sMedian

sSD

0.002

0.004

0.019

0.008

0.181

0.741

0.027

0.282

Terminology

LoadRunnerObjects

Term

Definition

VuserScripts

AVuserscriptdescribestheactionsthataVuserperformsduringthescenario.EachVuserexecutesaVuserscriptduringascenariorun.TheVuserscriptsincludefunctionsthatmeasureandrecordtheperformanceofyourapplication抯components.

LoadTest

Testsasystem'

sabilitytohandleaheavyworkload.Aloadtestsimulatesmultipletransactionsorusersinteractingwiththecomputeratthesametimeandprovidesreportsonresponsetimesandsystembehavior.

Run-TimeSettings

Run-TimesettingsallowyoutocustomizethewayaVuserscriptisexecuted.Youconfiguretherun-timesettingsfromtheControllerorVuGenbeforerunningascenario.YoucanviewinformationabouttheVusergroupsandscriptsthatwererunineachscenario,aswellastherun-timesettingsforeachscriptinascenario,intheScenarioRun-TimeSettingsdialogbox.

Scenario

Ascenariodefinestheeventsthatoccurduringeachtestingsession.Forexample,ascenariodefinesandcontrolsthenumberofuserstoemulate,theactionsthattheyperform,andthemachinesonwhichtheyruntheiremulations.

Scheduler

TheScheduleBuilderallowsyoutosetthetimethatthescenariowillstartrunning,thedurationtimeofthescenariooroftheVusergroupswithinthescenario,andtograduallyrunandstoptheVuserswithinthescenarioorwithinaVusergroup.ItalsoallowsyoutosettheloadbehaviorofVusersinascenario.

Session

WhenyouworkwiththeAnalysisutility,youworkwithinasession.AnAnalysissessioncontainsatleastonesetofscenarioresults(lrrfile).TheAnalysisutilityprocessesthescenarioresultinformationandgeneratesgraphsandreports.TheAnalysisstoresthedisplayinformationandlayoutsettingsfortheactivegraphsinafilewithan.lraextension.Eachsessionhasasessionname,resultfilename,databasename,directorypath,andtype.

Transactions

Atransactionrepresentsanactionorasetofactionsusedtomeasuretheperformanceoftheserver.YoudefinetransactionswithinyourVuserscriptbyenclosingtheappropriatesectionsofthescriptwithstartandendtransactionstatement.

Vusers

VusersorvirtualusersareusedbyLoadRunnerasareplacementforhumanusers.Whenyourunascenario,Vusersemulatetheactionsofhumanusersworkingwithyourapplication.Ascenariocancontaintens,hundreds,oreventhousandsofVusersrunningconcurrentlyonasingleworkstation.

GraphInformation

Average

Averagevalueofthegraphmeasurement'

s.

Hits

ThenumberofHTTPrequestsmadebyVuserstotheWebserver.

Maximum

Maximumvalueofthegraphmeasurement'

Thisisthetypeofresourcebeingmonitored

Median

Middlevalueofthegraphmeasurement'

Minimum

Minimumvalueofthegraphmeasurement'

NetworkDelay

Thetimeittakesforapacketofdatasentacrossthenetw

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 小学教育 > 语文

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1