




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、1性能測試概述1.1測試步驟1 .準備好測試環境;2 .根據測試用例錄制LR腳本,參數化;定義測試場景。3 .針對設計的每個測試場景,性能測試基本按照如下步驟進行:a.進行測試環境準備和測試數據準備;b.運行測試腳本/程序或者執行處理過程;c.收集并記錄測試指標。測試時需要收集的性能數據主要包括如下指標:指標說明Running Vusers并發用戶數Hits per Second每秒點擊數(即http請求數)Trans Response Time事務響應時間Trans/Sec (Passed)每秒事務數(通過),看曲線的性能走向。1.2明確測試需求舉例:并發虛擬用戶數300個(單機),要求在每
2、秒點擊數不大于1600的 情況下,系統能穩定的運行2個小時,事務響應率99.9%,響應時間不超過2 秒。2使用Loadrunner進行性能測試2.1 打開 loadrunner1) Windows啟動器輸入mstsc;2)打開性能測試服務器的遠程桌面, ip: 24;密碼 admin_h3c3) 打開 loadrunner11查看虛擬機的送斛幫助第 7 8 e£ 麗匚口馬丘火位苓在行歿案2.2錄制腳本LoadRunner LauncherWi;at's NewCreate/Edit ScriptsRun Load TestsAnalyze Test Re
3、sultsLoad Testing prevents costly and painful performance prublerns in pruductiun by detecting bottleriecks before a system or upgrade is deployed. By creating production workloads on IT systems in QA or staging, you can measure the perfurrnance of critical business processes under load and pinpuint
4、 bottlenecks for rapid resuh.jtiun. HP suftware's LoadRunner pruvides comprehensive support fur the most corTimon protocols and technologies- including ERPJCRM, Web, J2EE/.NET, XML, .NET, wireless and streaming mediaallowing IT groups to use a single pr口日utt fur load and perfurrnance testing of
5、all enterprise applicatiuns. Implementing an effective load testing process with HP software's LuadRunrier helps ensure that new or upgraded applications meet service level objectives and deploy to pruductiun with no perforrnance s:urprises.What's New in VuGenEnhanced support for Web 2 New T
6、ruClient prcitui: emulating user activity wil New protuculs for Micros cummuriicatting uver HTTF Enhanced data format sljfFeature Videos:昌 Intro duction to Ajax True 圜 Advanced data format :三 圜 SilYerlight protocol國 Java over HTTP protuCLWhat's New in Contro Enhanced Service Level percentiles Cu
7、ntrijller nuw allows cu:= measurements to accurnrrFeature Videos:昌 Service level agreement 圜 Customize monitor defai:耳目,I 盤? YrtRaxird- : 1 Tadis | J Script :TrB£ | Start PageLoadRunner - Virtual User GeneratorWelcome to the Virtual User GeneratorIn a perforrnance lesting or application managem
8、ent environment, HP 日"江口凱力口號Bplsi匚曰 human users working on physical ma chines v-yrth 'irtuar users, or Vu sets.The Virtual User Generator (VuGen) wurk?=: on a re c ord- a nod-p |:a y ba c k: pri n ci pl e. As walk through a business process on your application, VuGen records /our actions an
9、d ere alesWhat's NeProtocols AfaK TruCIre ui'wic / me ract vel) SilverlighlIransport Icxmcuiirq lava n-jp.r t jr3cluz.es Dtntr Jsva : niraductiorFed LU ti J ata Form1 TP/I UN structured. CoFelatio2.2.3打開網頁開始錄制等待打開網頁HP Virtual User- GeneratorL-aunching -application tfor recording .2.2.4錄制腳本Q后
10、程 0 -因向,/奠索 鵬英率京小國地址必南, - L丫什,IL :0B/ indeji:. hlral問卷調有Rocordim頁 :公司概況! 杳戶報務新聞同志:聯網雪藐聯網大戳據的 rffelK.w E i2.2.5完成錄制動態二聯網售票聯網大數據Record;n5. (172 eve2.2.7運行一次腳本 Fie Bzlt 0M Insert Vuser Acttme Teds wrdov Hdpstart Rjrf.ora Q QQ丁小心三一“ -.vucerjoil: 挈 Adtion ,腕r_errl , glcbd 工 hacti.R:vet jrl indcx. "r
11、ipit : / "KeccLir - 'RchZi.'JiLciil YRez=rer='. "EnanhoLt "Mr.ilHTIfT.y iKTRAEKS, JFlr- -j - -iipl Y0rl=.j Ten.pL 'Url=/ 7cir.fl ynr - > - -ii.ji Ur_一廠 mir.pl Jlr- -j - -1111I y0t1=.j 7en.pL "Uri, 7sn.pl LA STI-Start Page Running - norumGl - Web HTTP/UTT)Ivcb u
12、rl1" index, htn.lv,J;TRT._:,i - :i:/192. 1i.11 :=R/'Me:M匚“1二l一 tTtl匚-L 匚kL JUi.l 二'£ferer=ftJ"二匚之口二hotL inf”, ii-Enn.LJCTRARES.:F I nli - - I < / '.rSii ' I / 1 Fnin ''Jrl=/leiipleT?/'ief au.lt/in3jecn 匚 1 :tf J =cE iu.lt/inasc J-Tr 1-/ I ni '.-1>
13、/ >711.'. I / i iidt -Jrl-/!eiip_etc,/L.ez'au._t/inage J -Tl 1 一/ I rill - -| ? / :n 'il:' I / 1 min ''Jrl=/lejiplet?,'iez au.lt/inase -JrlM/tcnizlctE,'icfiu.lt/inasc LAST''ConelalionRSlU耳 Genefon LogRunTime DataBnding action Action.Ij 11111 Li i ; 31<1L
14、±MJ1 1.Enlins Yus er.S 二 irti.二立 ic7icn vlls cr cnci.Pn 11 rii "I I n:i n-:rr_i-ri 1.Vuj =t 1 erjiinited.2.2.9保存腳本irtualUs«riJeueratorFile Edit View Insert Vuser Actions Tools WindowHelpi.,.j Start Record |>必tartPage -non聲而引 HTTP/HTML)TaksIntroductionvuser_initActionvuser_eridW ; g
15、loLals.h1. Recordinq2.3.1設置場景 設置點擊率目標的場景.1 選擇場景及腳本.2 配置 10ad generator場景設置界面點擊Generators進入設置;點擊“Add”;輸入發生器的IP (本機填寫localhost)點擊“connect”,連接發生器;locslhostStatus J-DowPlatformWindowsDetails上用 Connect捌 Add.典 Delete.H Reset忌D*ikX DisableHelpClase_Load Generat ors可以看到狀態變為Ready,表示發生器連接
16、成功。N白桃StatusPlatformDetails底 local hi 3s:t/IN2002Lead Generaloi's.d 5口15 S..3選擇場景目標.1選擇場景及腳本.2 設置 vuserI 口展I! Schedule GSch&dub byRun Mode lobdlSefvfcE Lb舊 AqnDjuerii ra SLA 仙 theNetM bUtcm|Sd-iediJe-1AitlCCiPmpeiheiIriitialiTeIciLii-ilanViJEtt just bcfwc it transStartVu
17、zeteSt&rt LO Vusfliri. Z vnrv tti.QD.15 tHK:H1:5S:lDutiL l ank £-t Ofl tE:ljO 州:浦l型J? L kl' Ld V-qxbf i.Hn>1)雙擊圖中藍色start vusers部分,彈出action設置框;2)如圖中所示,一共產生10個vuser,每15秒產生2個vuser;3)可以從vuser產生圖中查看產生時序;Tm«i di50 罰SzMcW WeRe hVdf:fditddel行 5cbit>Rnof»rleslu LlkJ,e<« s
18、k£l WxawrWt nxuiO3J134-33.3LDti心通*AL3&00 3D.W.M DO.l2X>3 W.M.i11 79TdfeErs |5t«rt 50 ism: E CO W 35 'M SR rs)2.3.2開始壓力測試添加監控服務器在 windows resourses 監控界面右鍵,點擊 “Add Measurements添加監控主機IP添加監控cpu空閑率添加監控內存使用率2.32.7添加監控服務器完成重點觀察:1、是否有錯誤;2、響應時間是否正常;3、服務器性能是否正常
19、; 注:性能監控的其他方法:1)對于windows的服務器可以使用windows自帶的性能監控工具。2)對于linux的服務器,可以使用sar等工具。Sar u 3 200>cpu.txt3)13-3-11Sar - 3 200>men.txt對于虛擬機,可以使用vmware自帶的性能監控工具。CPU也用錯況(MHz4.00019.600 3.0D0 2.600 2.000 1.600 1.0001.3-3-T1內存湖即卜"1身"215卜T工:用卜年2:05卜1330匕具亨用山堵長目插虎推噌長匚交換KT2:1fiFl-2i25hT-2-45Ki3:D53E0D2
20、切口二口口口1JOOD13-3-1113-3-1113-3-1113-3-1113-3-1113-3-11133 Tl1 .730g 1 .5002.4查看性能測試結果Riming Musbtb - t+xiIb ween白ri口Available Ei口口h穹x|lW Run網必Ci >-| ',Tiie1Down 0Finding 0必1» 5taH 5crHT7P Reipcr-fies per SecondPagew Donnbaded per Seraid Rstiiffi per S BraidiJortiecliorfiComeclicns p-f Sec
21、nnd SSL per Stcond白-S野 tern Resou'ce Graph?'rriows RegourcBSUNKRKOjrMS5NMPEl-Natwork. Graph?叩行XtXtXi1 0LO:10:LO00:05:00日 Time (Hour:Min:Sec'iCd oiScaleMeaturemenlMachine1Idle Tirrt! (FVow55or_Totd)10cd host99d792.4.1測試概況Stub w j Hep l Hunnin 國 Vue ar e Hits per Sbcond | 71nr| Tr-saEcct o
22、n STurfuary kufirigs Tr ftriia-" KAEpanA Tim©Statistic: Sum mar '-'Maixlriiurn RbinnM。V申日部5 二Tfaitall TttELiiih口(S2,757,63,750八mrnqQ Ihrpuqh口ut bh1 七七口nd:(S3j?LlnE51Total H0<Stl36 3Atfcpaae iHi'fcs nei3 Second i£>07.0WiiEiN HTHTlP Resooriifes GXiimmaiYou can define 2LA data using the MLH 匚口nFi國urgban 量月r
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度中小企業貸款擔保合作協議
- 獨家合同:兩個單位聯合體投標協議
- 環境樣本中微生物的檢驗試題及答案
- 注冊會計師備考方法分享試題及答案
- 醫院保安工作總結計劃
- 開展社團特色活動的思路計劃
- 增強品牌知名度的戰略規劃計劃
- 新型微生物檢測方法的研究進展試題及答案
- 2025年注冊會計師考試成功之路反思試題及答案
- 2025年證券從業資格證重要考點清理試題及答案
- 兒童康復家庭指導培訓課件
- 單元2-任務3 水利工程年運行費及年費用計算
- 鑄鐵機維護保養及故障預防策略
- 個人分紅保險精算規定
- JB T 7946.1-2017鑄造鋁合金金相
- 榮威汽車內飾環保材料研發與應用
- SCA涂膠機內部培訓資料課件
- 美妝護膚直播培訓課件
- 流動人口計劃生育服務管理信息系統培訓
- 招投標培訓教程課件
- (完整版)【鋼琴譜】大魚鋼琴譜
評論
0/150
提交評論