1. 程式人生 > >loadrunner進階——學習二、制定負載測試計劃

loadrunner進階——學習二、制定負載測試計劃

學習二、制定負載測試計劃

制定負載測試計劃一般需要三個步驟:

Created with Raphaël 2.1.0分析應用程式確定測試目標計劃怎樣執行

1.分析應用程式

1)確定系統的組成

畫出系統的組成圖。組成圖要包括系統中的所有的元件,以及相互之間是如何通訊的。

2)描述系統配置

畫出系統組成圖後,試著回答一下問題,對組成圖進行完善:

  • 預計有多少使用者會連到系統
  • 客戶機的配置情況(硬體、記憶體、作業系統、軟體工具等)
  • 伺服器使用什麼型別的資料庫以及伺服器的配置情況
  • 客戶機和伺服器之間如何通訊
  • 還有什麼元件會影響Response Time指標(比如Modem等)
  • 通訊裝置(網絡卡、路由器等)的吞吐量是多少?每個通訊裝置能夠處理多少併發使用者

3)分析最普通的使用方法

瞭解該系統最常用的功能,確定哪些功能需要優先測試、什麼角色使用該系統以及每個角色會有多少人、每個角色的地理分佈情況等,從而預測負載的最高峰出現的情況。

2.確定測試目標

Objective Answsers the Question
Measuring end-user response time How long does it take to complete a business process?
Defining optimal hardware configuration Which hardware configuration provides the best performance?
Checking reliability How hard or long can the system work without errors or failures?
Checking hardware or software upgrades How does the upgrade affect performance or reliability?
Evaluating new capacity Which server hardware or software should you choose?
Measuring system capacity How much load can the system handle without significant performance degradation?
Identifying bottlenecks Which element is slowing down response time?

這一步還要確定何時開始負載測試,在不同的階段進行什麼內容的負載測試。見下表:

Planning and Design Development Deployment Production Evolution
Evaluate new products Measure response time Check reliability Measure response time Check HW or SW upgrades
Measure response time Check optimal hardware configuration Measure response time Identify bottlenecks Measure system capacity
Check HW or SW upgrades Measure system capacity
Check reliability

3.計劃怎樣執行LR

確定要使用LR度量哪些效能引數,根據測量結果計算哪些引數,從而可以確定Vuser的活動,最終可以確定哪些是系統的瓶頸等。

在這裡還要選擇測試環境,測試機器的配置情況等。