LoadRunner基本使用流程及結(jié)果分析(圖文)_第1頁
LoadRunner基本使用流程及結(jié)果分析(圖文)_第2頁
LoadRunner基本使用流程及結(jié)果分析(圖文)_第3頁
LoadRunner基本使用流程及結(jié)果分析(圖文)_第4頁
LoadRunner基本使用流程及結(jié)果分析(圖文)_第5頁
已閱讀5頁,還剩41頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

LoadRunner基本使用流程及結(jié)果分析(圖文)

L打開

2.點(diǎn)擊編輯腳本

■HPLoadRunner11.00

般1LoadRunner

Configuration▼Help▼

LoadRunnerLauncher

Create/EditScripts

JllnRunLoadTests

%.AnalyzeTestResults

LoadTestingpreventscostlyandpainfulperformanceproblemsinproduction

bydetectingbottlenecksbeforeasystemorupgradeisdeployed.Bycreating

productionworkloadsonITsystemsinQAorstaging,youcanmeasurethe

performanceofcriticalbusinessprocessesunderloadandpinpoint

bottlenecksforrapidresolution.HPsoftware'sLoadRunnerprovides

comprehensivesupportforthemostcommonprotocolsandtechnologies-

includingERP/CRM,Wet,J2EE/.NET,XML..NET.wirelessandstreaming

media-allowingITgroupstouseasingleproductforloadandperformance

testingofallenterpriseapplications.Implementinganeffectiveloadtesting

processwithHPsoftware'sLoadRunnerhelpsensurethatneworupgraded

applicationsmeetservicelevelobjectivesanddeploytoproductionwithno

performancesurprises.

3.點(diǎn)擊按鈕新建腳本

HPVirtualUserGenerator—[StartPage]

;%ViewToolsWindowHelp

StartPage

LoadRunner-VirtualUserGenerator

WelcometotheVirtualUserGenerator

Inaperformancetestingorapplicationmanagementenvironment,HPapplicationsreplace

humanusersworkingonphysicalmachineswith"virtual"users,orVusers.

TheVirtualUserGenerator(VuGen)worksonarecord-and-playbackprinciple.Asyouwalk

throughabusinessprocessonyourapplication,VuGenrecordsyouractionsandcreates

automatedscriptswhichwillformthefoundationforyourbusinesstechnologyoptimization.

Newscriptrecentprotocol

,ifWeb(HTTP/HTML)

Openrecentscript

4.彈出對(duì)話框,選著web(/html)

5.輸入網(wǎng)址,點(diǎn)擊ok

6.錄制腳本,錄制終止后,點(diǎn)擊一下按鈕停止錄制

Recording…(123events).

7.錄制成功后,生成腳本

8.點(diǎn)擊如下按鈕回放腳本

9.點(diǎn)此按鈕,可新增action

10.點(diǎn)此按鈕能夠進(jìn)行錄制和回放設(shè)置

11.彈出的參數(shù)話界面

一樣回放設(shè)置下那個(gè)地點(diǎn)就好

12.點(diǎn)擊圖中圖表設(shè)置參數(shù)化

13.彈出的設(shè)置界面,要緊設(shè)置紅色區(qū)域的幾個(gè)地點(diǎn)

14.以下圖按鈕為腳本調(diào)試

VirtualU^eiGeneratox-[nonaael2-¥eb(HTTP/HTIL)]

:Elle£ditviewinsertVuser|actionsHods必dew曲

■StartRecordng...Ctrl+Rj貞Tasks

noname12-WRunF5

4"vuser_ntStopCtrl-?-F5

。Action

Pause

.vu$eLend

翻globakhCQiroieShift+F5

RunStepfayStepF10

ParawterCtrl+L

ScanScriptforCorrelationsCtrl+F8

ScatforCorrelations(atCursor)Alt+F8

CreateCorrelates

Run-TimeSettings...F4

15.以下圖按鈕為設(shè)置時(shí)刻的事實(shí)上點(diǎn)和終止點(diǎn)的按鈕

16.以下圖兩個(gè)按鈕分別為與hp質(zhì)量治理工具ALM連接按鈕和創(chuàng)建場景按鈕

IIPVirtualU?crGenerator[non?Bc!?Web(HTTP/nTW.)]

:BteEdtviewinsertVyserfictionsIpob|四cntow曲

9-J,酉,CilwLfStactftecadpHPALMconnectton...

startPage|nonamel2-Web(HHP/HTMLaCreateContrctefSceiaro...

wserjrit

<'ActionCemparewthSerpt...

廣vxjsei_end

)|CompaceSnapshots.

petalsh

?nerateSerpt...

ecatjonNotificabi

F7

GeneralCottons...

BecordrijOptions...Ctrl4F7

Cystomte...

17.插入事件,分別表示時(shí)刻的開始和終止

*VirtualUserGenerator-(noraael-Feb(HTTP/HTIL)]

:EteEdtW*Insect|vwsefActionslookWJrdowbefc

?三.叫?4g“Step…Alt*ln$ert6年②L(^=5Taskst:,I,TreeJ:

二LTrrKArhnn...ftri+T

non<imel-Web(i

f*EndTr^sdcMCtrUO

Rendezvcus...url(printcr64.gif?

0vi?er_end^URL=http://192.168.0.166/s*c/fra>e/iiages/printer64.gif*,

Qorrment..,Resource"",

Wokbateh

LogMessage...RecContentType=inage/gif*,

Refcrer=http://192.168.0.166/sB<7fra>e/Menu.Jsp*,

btewparameter…Shap$h0tBt51.infr,

.AST);

國leggteF9

*URL=http://192.168.0.166/SBC/fra*e/iaage$/areate.gif".

*Rcsource=l*,

*RecContentType=lBage/glf*,

*Re£erer?http://192.168.0.166/?c/frue/lenu.j$p\

*Snapshot=t52.inf*,

LAST);

web.url(*vait.gif',

*URL=http://192.168.0.166/sBc/fraMe/inages/wait.gif*?

*Resource=lx,

*RecContentType^inage/glf*,

*Referer=http://192.168.0.166/s>c/fra*e/Menu.jsp",

*Snapshot=t53.inf*,

LAST),

veb.url(*join.gif",

*URL=http://192.168.0.166/sBc/fraBe/i>ages/Join.gif*,

,ReGouru-l".

*RccContentType=iJiage/gif*,

*Referer=http://192.168.0.166/sBc/fraMe/lenu.Jspr,

*Snapshot=t54.Inf*,

LAST);

web.url(*apply,gif*,

fn,//IQ71ARH11,off'

事件插入成功:

CIII,VirtwniOverCrnerntor(nonaarI,■!>(IITTr/HTII.)]

??J3?Ha!?SUrtRocordeTroo1^3:,苕

<eb-cwtoa_request<*Securltces.cbeckLocSize.E、

*(JiL=http://1^2.166.0.IGA/sic/dtr/call/plalncail/SecurltylCServices.checkLotSlxe.dvr*.

小K名、

*Resource?O*J

*RecC?itentTyF?-teit/javascript*,

*Re£erer-http://192.168.0.166/sac/loeon.Jsp*?

*Stiap8hot*tl6.Inf*,

'■,diHTTF、

*EacTypestext/pleln*,

*B?dy=<tnC<.unt=)\rx>age=/tBc/Ug<?,J?p\nhttpSeiSlonld=649iraK^CnECC5I>3C09765ABC95752\rw<;rlptSesslonI<3=A4&3!F31F5,

LACT);

lrthiaktl>e(4);

lr_8tajt_transactlc<i(*loclnln*>;

we&_s?Jtaiit_clata^!115?nA:*i<nX.d<,

*A?tl??i-httpi//192.168.0.1664ne/】oB4?x&e,lonX?d。'.

Frhcd-POSr,

'fUcCccumtType^i/hfI

*R<ferer=http://192.168.0.166/8tc/lo^<?n.Jtp*,

*S^r?hot=tn.lnf\

??^de=HTTP\

ITI1DATA.

*Kuie=usemaie*,*Value=InaaeJ*.ODIT1I.

*Bx>e=pa5S<ord*,*Valxie=Ipassvdr,EHDllEl4

*KVtif>ime^tdo?oaialnlnDlnirs5\*7alue?secureone.UDITU4

*Mi>e-devlceI(r-*Value->,E5DITE1,

LACT);

web_adt_c^kleCy5-sMc.lastl9gon.usemaie-sXSAsa,168.0.166'),

OSRwivU>0IXRecadnflLoaUCoaaWoiRmti?.9GenecfunloQ

18.設(shè)置集合點(diǎn)

步HPVirtualOserCenvratorInonaae1feb(HTTP/BTIL)J

[曲曲常13jVtfMffiction;lookfcntw時(shí)

t^wStep...AJHCrwr:

iUftTrjetton..CtrkT

findTransaztc^CtrkDlsf)7

VAc5

<'vu:c<_erdwto?.requestCSecurltylCServlces.checkLogSize.dvr,

'二Common,…URL=http://192.168.0.166/5?c/dvr/call/plaincall/Secixrit><CService5.checkLo^Size.drr",

logtfKMQO...Iethod-POST\

Resc<irce*?*,

Mew£?r4rne<e<..RecContentType=text/Javascript*,

Referer=http://ld2.168.0.166/sac/logon.jspr,

工OQ^awkporitRShap$hot=tl6.inf*,

lode-tHTP*,

*EncType?text/plain*,

^dy=cancount=l\npage=/sic/l<>gon.j8p\rtittpSesslonl(?=6491BBlKICElBDC5D3CO9765AK^573Z\nscrlpt5e8slonl

UST),

lr_thlnk.tlBe<4),

lr_start_tran5action(*loglnln*);

veb_subalt-data(*lGgGnActlonX.do*,

*Acti0n=http://192.168.0.166/8ac/10gonActlonX.(to*,

*Iethod=POST\

r

*RecContentT>pe=text/htil>,

r

*Referer*http://l&2-168.0.166/sac/logon.jspt

?Shapshot-tl7.lnf\

*lode=ffnP\

ITMDATA,

*Naae=u5ernaae*,*V31ue=[na?elr.EHDITEI,

?Xaae-password*,*Value?(passvd}*,EXDITEI,

*Xaae-dc?ainDns\'Value-ureonu.eg。EXDIIII,

*MaBe=deviceId\*Value=\KMD1TM,

LAST),

veb_add_cookie(*ys-s*c.lastlogco.usemaae-s%3Asa.WIAIX?192.168.0.166*>4

創(chuàng)建場景

1.在vugcn中點(diǎn)擊圖中按鈕創(chuàng)建場景

2.彈出編輯框,設(shè)置場景,設(shè)置完成后點(diǎn)擊。k

第?個(gè)是目標(biāo)場景

第二個(gè)是手動(dòng)場景

其中手動(dòng)場景能夠設(shè)置加載虛擬用戶數(shù)

夕HPVirtual-(?QMM3???■(BTTP/HT1L)]

:囪Edt^ew(recrtVyxrActionslock即dowg)

|gTree.;譽(yù)

?nonomeJWrb(HIIP/HIML)

?■ode=HTIL\

?*BncTypc=text/plain*,

4Body=callC<?unt=1\npagc=/sic/lo?on.j5p\nhttpSessionId=0C12562326520601E7FCEC?5C?ClCHB7\nscriptSwsion

UST);

ieb_<ustoa.request(*SecuritylCServlces.getDc?alns.Orr*,

*URL=http://192.168.0.166/8nc/tkr/<:all/plalncalbSecurltyWCServlces.getDoaalns.Rr',

;?ethod=POST*,

’RCSOUTCBO",

,RecContentType-text/Javascrlpt*,

?Referer?h"''

'Snapshot二

?Bode=H7ML

*EncType=t(

*Body*call?CC12562326520601E7FCEC?5CiBClCHE>7\nscrlptSe55ion.j

UST).

lr_think_tlie(

<eb_subiit_<Ut

-Action-ht

'■etho中PO;

-RecConten

*Referer=h

^Snapsbotg

?■ode-HTIL

1TE1DATA,

*Saie=user

*Biie=passi

bR3r31?乙CaieUtflnRmAtWGweiatonLoo

?**?*?StartLos配88age-

VebRecorderversion:11.0.9375.0

^ecordir^lode:HTML-basedscript

iotrecord!n<headers

<otexcludlnscontenttypes

I>onotrecordthiscontenttypesasaresource:

text/htul

text/xil

^esetcontextbetweenactions

Recordrx>n-HTILeleaentsincurrentHULfunction

Prot<xolType:■ulti-QTIeb

$$$$$$EndLogBessage$$$$$$

3.雙擊那個(gè)地點(diǎn)選著加壓主機(jī)

第HPLoadRunnerController-Scenario1[Design⑴]

EileYi"ScenarioResultsQia^nos:xcsToo^sKelp

ServiceLevel

ServiceLevelAg

CurtenilyroSLAru

ClicktheNewb?K

ScenarioSchedule

廠>&g回國Qa沒

SchedJcName|Schedute1

InteractiveSc

SchedJeby:Scer?no「Group

2

RunModeGRedv^orWschedule「BasicschedJe

GlobalSchedule

Total:1Vuscrz

ActionProperties

InitializaeachVas^rjustbeforeitrims

11>IStartVusersStwt1Vusers:2every00:00:15(XH:NNSS)11

DurationRunfor0005:00(MHnnSS)

4.選擇主機(jī)ip,和系統(tǒng)

5.點(diǎn)擊ok關(guān)閉對(duì)話框

圖中紅色區(qū)域是選著場景執(zhí)行方式:模擬真是環(huán)境依舊基于時(shí)刻表模擬

用HPl.oMtlRtinn9rCantroller-Scen?riol-(Dwxicn(l))

Zil?出**ScQtri。laa4&ottic*To4*|plp

目片。?)空1髏

6.以下圖中:

1)Scheduleby選項(xiàng)表示加載方式,基于腳本依舊基于組

2)Runmode表示加載模式:分別表示模擬真實(shí)情形和依舊基于場景

ScenarioSchedule

圜x回,O

ScheduleName:Schedule1V]

Scheduleby:6Scenario「Group

RunMode:6Real-wohdschedule''Basicschedule

GlobalSchedule

”Total:1Vusers

ActionFroperbes

InitializeIr.itializeeachVuserjustbeforeitruns

?StartVusersStart1Vusers:2every00:00:15(HH:MM:SS)

DurationRrnfor00:05:00(HH:MM:SS)

StopVusersStopallVusers:5every00:00:30Q(H:MM:SS)

*

DesignRun

7.雙擊以下圖紅色區(qū)域,可選著加壓力度

AHPI.tiMdRunncrController-Scttnariol-[Dcjricn(l)][J史

匕1?Sc?Qari?&?r?ltsT?〃x“p

3aiQtj名幽

8.雙擊紅色區(qū)域,可設(shè)置壓力下完運(yùn)行時(shí)刻

9.雙擊下面紅色的內(nèi)容,能夠選著虛擬用戶停止的模式

ScenonoSchedule

10.彈出設(shè)置選項(xiàng)框,能夠選著停止的方式

全部一下停止

每多少時(shí)刻停止多少個(gè)的方式停止

v

EditAction

schedule

beforeitruns

11.點(diǎn)擊run,來到執(zhí)行界面

PLoadKunnerControllerScenariol(DesicnCl)J

aaa山切e

ScenarioGroup%

x:

ScnreLcvdAgroamant

noSIAVw匕theMIE

3c*.JH*tutonlodaAneSLAaiare*fork*?dg

bcenonobchedule

S<hedJeKane[$3S5Sl3

SchevKy6「6*wp

Gloi^riSchedule

J.?Y??Total:1TUI?T?

Ad?nPM**

I^itialicelAitialiteetckVu*?rju*l¥?for?itE

|$<wtV?t?r(StvtiVof4rs2rtry000019OOfM$$)M

gz“nRxn£?80600OHMiSS)

隊(duì)”YSt>?r>3t?y?U2”,3?rty000030OK■M

11-

000000000100000200000300OOWOO000500000600

Time

年NORtSM

.KFU?ihxnx?r1100f)X?VirE』V??rEUpZ/itt1660明門1403,“白CM=f21:47

12.在執(zhí)行界面點(diǎn)擊startScenario,開始跑場景

Av-UbleFJ-rrrgVuscrs.wtwtesceosnoTransResponseTne-who*?scenano

-RirineGwc^

R?rv?gVuMt>

Uic<OehnedD&aPorn

UotSUMKi

VuterjtWhEnon

rh*ti*,s&Sd

ItemReipomeTnw

Twnj/SeclP*X|

13.以下圖為執(zhí)行過程中

55HPLoadKunnerController-Scenario!"(Run)|[X|

匕1'Se?^wioTo?l?

gQWneRrde:PsNdF3£mG3al£ig£MgStoeps

AloMcbaophsvusers-wnc*soenarto

閂RvrtireGiaph:

RtnrroVuMii

UwO^rwdD?f?Ports

£nc?Stated

VuMti*4hEnert

=Ttanwc?wGiecihi

TiaraAeKKXKeTme

T,c/Sy(Pgy

Tw/Sec(FaM.Smeel(tanwdTne

TodTiam/^eclP*X|*4?Ae?cwwv)

WW9FWUMC*Gt?hs

H<ipecSecord

Thfougt^a

HTTPR4xponmc*rSecond

Pw?p?Secord

R?imptiSeccnd

C^rnedcm

CornMcmp?Secord

SSLRSecoM

Tm?g,MrxSec)

QArJScflte[Mw/wrert

l::八/VjvO/xm.r11008*V;rQ*talV??rM悔〃1921680.R4U?4ftva^r3CM

14.場景跑完后顯不如圖界面:

其中右邊紅色區(qū)域是運(yùn)行過程中監(jiān)控服務(wù)器的資源占用率等等的一些信息,在左邊還能

夠添加或查看其他的一些圖標(biāo)

?^SctrM

RsdwP品饗:EvotGiaduaiEninaSigetJ

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論