軟件性能測試模擬筆試題目(一)


 

注:本試卷中題目所涉及性能測試工具如無特殊說明則均為LoadRunner。

一、        簡答題(2*10=20分)

  1. 1.     客戶交付一個性能測試項目,請闡述你的實施流程。
  2. 2.     解釋5個常用的性能指標的名稱與具體含義。
  3. 3.     寫出5個Loadrunner中常用函數,並對其中2個舉例說明用法。
  4. 4.     簡述LoadRunner的工作原理?
  5. 5.     什么是集合點?設置集合點有什么意義?LoadRunner中設置集合點的函數是哪個?
  6. 6.     HTML-based script與URL-based script的腳本有什么區別?
  7. 7.     如何設置LaodRunner才能讓集合點只對一半的用戶生效?
  8. 8.     LoadRunner的Controller組件中Pacing參數的作用是什么?
  9. 9.     LoadRunner中如何監控Windows資源?
  10. 10.  如果讓QALoad模擬LoadRunner中只對關注的性能點進行迭代測試,你有什么好方法?
  11. 11.  什么是負載測試
  12. 12.  什么是性能測試?
  13. 13.  說明負載測試過程?
  14. 14.  我們什么時候做負載和性能測試?
  15. 15.  什么是LoadRunner的組件?
  16. 16.  你用LoadRunner的哪個組件錄制腳本?
  17. 17.  在多用戶模式下你用LoadRunnner的哪個組件來回放腳本?
  18. 18.  在多用戶模式下你用LoadRunnner的哪個組件來回放腳本?
  19. 19.  什么是場景
  20. 20.  解釋Web Vuser腳本的錄制模式
  21. 21.  為什么創建參數?
  22. 22.  什么是關聯?解釋自動關聯和手動關聯的區別
  23. 23.  什么是關聯?解釋自動關聯和手動關聯的區別
  24. 24.  你在哪里設置自動關聯的選項
  25. 25.  什么函數可以捕捉到web Vuser腳本的動態值?
  26. 26.  什么時候你在虛擬用戶產生器中禁用日志,什么時候選擇標准日志和擴展日志?
  27. 27.  你如何調試LoadRunner的腳本?
  28. 28.  你怎么寫LR中用戶自定義的函數?寫幾個你以前項目中的函數?
  29. 29.  在run-time setting里你可以設置哪些改變?
  30. 30.  你在哪里設置Vuser測試時迭代?
  31. 31.  你如何在負載下執行功能測試?
  32. 32.  什么是Ramp up?你如何設置?
  33. 33.  Vuser作為線程運行的優勢是什么?
  34. 34.  如果你想停止執行出錯的腳本,怎么做?
  35. 35.  響應時間和吞吐量間的關系是什么?
  36. 36.  你如何識別性能瓶頸?
  37. 37.  如果web服務器、數據庫服務器、網絡都一切正常,那么哪里可能有問題?
  38. 38.  你如何找出web服務器相關的問題?
  39. 39.  你是怎么找到數據庫中的相關問題?
  40. 40.  覆蓋圖和關聯圖之間的區別是什么?
  41. 41.  你是怎么計划負載的?標准是什么?
  42. 42.  vuser_init動作包含什么?
  43. 43.  vuser_end動作包含什么?
  44. 44.  什么是Think Time?你如何改變這個閾值?
  45. 45.  簡述使用Loadrunner的步驟
  46. 46.  什么是集合點?設置集合點有什么意義?Loadrunner中設置集合點的函數是哪個?
  47. 47.  請解釋一下如何錄制web腳本?
  48. 48.  請解釋一下自動關聯和手動關聯的不同。
  49. 49.  哪個函數是用來截取虛擬用戶腳本中的動態值?(手工關聯)
  50. 50.  你如何在負載測試模式下執行功能測試?
  51. 51.  什么是逐步遞增?你如何來設置?
  52. 52.  當你需要在出錯時停止執行腳本,你怎么做?
  53. 53.  響應時間和吞吐量之間的關系是什么?
  54. 54.  說明一下如何在LR中配置系統計數器?
  55. 55.  .如果web服務器、數據庫以及網絡都正常,問題會出在哪里?
  56. 56.  如何發現web服務器的相關問題?
  57. 57.  .如何發現數據庫的相關問題?
  58. 58.  解釋所有web錄制配置?
  59. 59.  你如何設計負載?標准是什么?
  60. 60.  什么是吞吐量?
  61. 61.  在LoadRunner中為什么要設置思考時間和pacing
  62. 62.  如何理解TPS?
  63. 63.  loadrunner中的設置線程和進程的區別
  64. 64.  loadrunner如何遍歷一個頁面中的url並進行訪問?
  65. 65.  HTML-Based scrīpt 和URL-Based scrīpt 錄制的區別?
  66. 66.  LoadRunner如何創建腳本?
  67. 67.  LoadRunner如何設置Recording Options 選項?(以單協議http/html為例)
  68. 68.  LoadRunner如何選擇協議?
  69. 69.  Loadrunner支持哪些常用協議?
  70. 70.  性能測試的類型都有哪些?
  71. 71.  Loadrunner常用的分析點都有哪些?
  72. 72.  LoadRunner請求無法找到如何解決?
  73. 73.  LoadRunner HTTP服務器狀態代碼都有哪些?如何解決?
  74. 74.  HTTP的超時有哪三種?
  75. 75.  在什么地方設置HTTP頁面filter?
  76. 76.  如何設置可以讓一個虛擬IP對應到一個Vuser?
  77. 77.  什么是contentcheck?如何來用?
  78. 78.  network中的speed simulation是模擬的什么帶寬?
  79. 79.  生成WEB性能圖有什么意義?大概描述即可。
  80. 80.  WAN emulation是模擬什么的?
  81. 81.  如何設置才能讓集合點只對一半的用戶生效?
  82. 82.  在設置windows資源圖監控的時候,用到的是什么端口和協議?在這一過程中,會有大概哪些問題?(大概描述)
  83. 83.  樹視圖和腳本視圖各有什么優點?
  84. 84.  需要關聯的數據怎么確定?
  85. 85.  解釋以下函數及他們的不同之處。
  86. 86.  Lr_debug_message

Lr_output_message

Lr_error_message

Lrd_stmt

Lrd_fetch

 

二、選擇題(2*5=10

  1. 1.     During the run of a scenario, which LoadRunner component stores the performance monitoring data?

A. Analysis   B. Controller   C. File server    D. Load generator/host

  1. 2.     Where are the results stored during the run of a scenario?

A. Analysis    B. Controller    C. Utility server     D. Load generator

  1. 3.     A script was recorded with an average think time for an advanced user. An advanced user pauses 5 seconds between clicks. A first-time user pauses an average of 10 seconds between clicks. How can you modify the think time run-time settings to emulate a first-time user?
    A. Set the think time to s recorded
    B. Set the think time to multiply the recorded think time by 4
    C. Set the think time to a random percentage between 150% - 250%
    D. Set the think time to replay as recorded, but limit the think time to 10 seconds
  2. 4.     Which HTTP error code indicates that an individual business process is failing under load or the web application itself has crashed?
    1. A.   200   B. 403   C. 401    D. 500
    2. 5.     What is an intersection point in a business process?

A. Scenario    B. Rendezvous   C. Transaction     D. Service level agreement

 

三、LoadRunner工具使用題:(10*2=20分)

  1. 1.     web系統中,username參數表為file類型,表中有12個值,分別A、B、C、D、E、F、G、H、I、J、K、L。測試場景中虛擬並發用戶數設為4,迭代次數設為3,參數中Select next row與Update value on分別為(Sequential, Each Iteration)與(Unique, Once)時,寫出迭代3次的取值情況。

(Select next row, Update value on)        虛擬用戶取值(VUi:迭代時取值)

(Sequential, Each Iteration)

VU1

VU2

VU3

VU4

(Unique, Once)       

VU1

VU2

VU3

VU4

  1. 2.     web系統腳本錄制過程中,兩次錄制同一功能點,在View Tree的Server Response中產生的字符串分別為:

Server Response:name="_id_Node " value=" RSDP0013425" />", ENDITEM,

Server Response:name="_id_Node " value=" RSDP1203655" />", ENDITEM,

為腳本回放成功,需要對字符串中某些字符做一定處理,寫出詳細實現方法。

 

四、 英文面試題

1. What is load testing?

2. What is Performance testing?

3. Did u use LoadRunner?

4. Explain the Load testing process?

5. When do you do load and performance Testing?

6. What are the components of LoadRunner?

7. What Component of LoadRunner would you use to record a Script?

8. What Component of LoadRunner would you use to play Back the script in multi user mode?

9. What is a rendezvous point?

10. What is a scenario?

11. Explain the recording mode for web Vuser script?

12. Why do you create parameters?

13. What is correlation?

14. How do you find out where correlation is required?

15. Where do you set automatic correlation options?

16. What is a function to capture dynamic values in the web Vuser script?

17. When do you disable log in Virtual User Generator, When do you choose standard and extended logs?

18. How do you debug a LoadRunner script?

19. How do you write user defined functions in LR?

20. What are the changes you can make in run-time settings?

21. Where do you set Iteration for Vuser testing?

22. How do you perform functional testing under load?

23. What is Ramp up? How do you set this?

24. What is the advantage of running the Vuser as thread?

25. If you want to stop the execution of your script on error, how do you do that?

26. What is the relation between Response Time and Throughput?

27. Explain the Configuration of your systems?

28. How do you identify the performance bottlenecks?

29. If web server, database and Network are all fine where could be the problem?

30. How did you find web server related issues?

31. How did you find database related issues?

五.項目分析題

(試題一)閱讀下列說明,回答問題1 至問題3,將解答填入答題紙的對應欄內。
【說明】軟件系統性能調優的關鍵是首先作好性能故障定位,面對軟件系統中運行在不同平台上的多個服務器、多種應用、大量工作站以及局域網、廣域網和其他類型的網絡體系結構,故障點交錯,故障定位測試非常復雜。下述是《工作流平台系統》的性能測試案例描述及結果數據:
  ● 測試案例描述:模擬多用戶登錄《工作流平台系統》,針對工作流A、B、C 分別連續創建20 個實例,在單機和集群運行環境下分別對系統進行負載壓力性能測試。單機環境下測試用機與一台應用服務器連在同一交換機上,壓力直接加在一台應用服務器上。集群環境下測試用機與服務器集群連接在同一交換機上,壓力由負載均衡模塊分攤到倆台應用服務器上。在單機和集群運行環境中應用服務器和一台數據庫服務器連接。
  ● 客戶端交易並發執行測試數據:

1 單機運行環境

測試
案例

並發用
戶數

響應時間(秒)

最大值

平均值

最小值

創建
工作
流A
實例

120

0.675

0.686

0.03

 240

0.756

0.479

0.034

 

2 集群運行環境

測試
案例

並發用
戶數

響應時間(秒)

最大值

平均值

最小值

創建
工作
流A
實例

120

0.113

0.088

0.01

 240

0.103

0.117

0.01

 

  ● 服務器資源占用情況
  1 單機運行環境①應用服務器資源占用情況

測試案例

並發用戶數

資源占用指標

最大值

平均值

最小值

創建工作流
A 實例

120

CPU Utilization(%)

33.8

10.054

2.9

Paging Rate(page/s)

2.5

0.082

0

Disk traffic(Mbyte/s)

9.75

0.813

0

240

CPU Utilization(%)

38.1

8.713

0.875

Paging Rate(page/s)

0.25

0.015

0

Disk traffic(Mbyte/s)

2.6

0.336

0

②數據庫服務器資源占用情況

測試案例

並發用戶數

資源占用指標

最大值

平均值

最小值

創建工作流
A 實例

120

CPU Utilization(%)

44.875

5.085

0.5

Paging Rate(page/s)

4.75

0.274

0

Disk traffic(Mbyte/s)

8.8

1.824

0.6

240

CPU Utilization(%)

12.2

1.766

0.5

Paging Rate(page/s)

5.4

0.244

0

Disk traffic(Mbyte/s)

7.2

1.584

0.6

 

測試案例

並發用戶數

資源占用指標

最大值

平均值

最小值

創建工作流
B 實例和工
作流C 實例

60

CPU Utilization(%)

100

87.082

0.875

Paging Rate(page/s)

268.992

158.865

0

Disk traffic(Mbyte/s)

193.319

110.948

2.25

120

CPU Utilization(%)

99.3

88.419

1.15

Paging Rate(page/s)

751.358

189.785

1.8

Disk traffic(Mbyte/s)

217.775

146.304

2

240

CPU Utilization(%)

100

88.909

0.6

Paging Rate(page/s)

521.447

151.829

0

Disk traffic(Mbyte/s)

197.725

146.285

0.6

  2 集群運行環境①倆台應用服務器資源占用情況

測試
案例

並發用戶數

資源占用指標

應用服務器1

應用服務器2

最大值

平均值

最小值

最大值

平均值

最小值

創建工
作流
A 實例

120

CPU Utilization(%)

46

21.005

14

46.25

14.025

7.667

Paging Rate(page/s)

3.5

0.392

0

2.167

0.206

0

Disk traffic(Mbyte/s)

65.334

6.647

0

73.833

7.588

0

240

CPU Utilization(%)

42

27.163

1.583

37.333

17.856

0.75

Paging Rate(page/s)

3

0.206

0

0.667

0.045

0

Disk traffic(Mbyte/s)

7

0.849

0

6

0.674

0

  ②數據庫服務器資源占用情況

測試案例

並發用戶數

資源占用指標

最大值

平均值

最小值

創建工作流
A 實例

120

CPU Utilization(%)

13

2.868

0.333

Paging Rate(page/s)

0

0

0

Disk traffic(Mbyte/s)

6.667

1.767

0.6

240

CPU Utilization(%)

34.5

5.644

0.25

Paging Rate(page/s)

10.667

0.508

0

Disk traffic(Mbyte/s)

5.6

1.596

0.75

【問題1】單機運行環境和集群運行環境下,系統能夠提供的客戶端並發性能服務等級哪種更好?為什么?
【問題2】試分析系統應用服務器和數據庫服務器資源使用情況如何?是否有瓶頸存在?單機運行環境和集群運行環境相比,哪種環境下資源占用率更高?為什么?隨着系統並發負載的加大,試預測哪種環境下資源占用率遞增更快?
【問題3】
集群對系統性能有哪些貢獻?有哪些弊端?該系統是否應該采用此集群部署策略?

 

(試題二)

下面是一個項目的性能測試結果,請分析可能存在的性能問題。

 


 

 

Unix服務器性能監控(數據庫服務器內存8G,上千萬行大量數據)

監控對象

性能參數

說明

內存

Memory

Real Free MBytes

可用自由內存總量,單位是兆字節

Virtual Free MBytes

可用自由虛擬內存總量,單位是兆字節

網絡Network Interface

Bytes Total/s

網絡發送和接收的速率,單位是字節/秒

磁盤

Physical Disk

Disk Read KB/s

磁盤讀取速率,單位是千字節/秒

Disk Write KB/s

磁盤寫入速率,單位是千字節/秒

處理器

Processor

CPU Time%

處理器執行非閑置線程時間的百分比

Wait Time%

處理器執行等待時間的百分比

       

 

Linux服務器性能監控(應用服務器內存4G)

監控對象

性能參數

說明

內存

Memory

Available Swap MBytes

顯示Swap空間的剩余量,單位是千字節

Free Memory MBytes

可用自由內存總量,單位是千字節

網絡Network Interface

Bytes Total/s

網絡發送和接收的速率,單位是字節/秒

磁盤

Physical Disk

Disk Read KB/s

磁盤讀取速率,單位是千字節/秒

Disk Write KB/s

磁盤寫入速率,單位是千字節/秒

處理器

Processor

CPU Time%

處理器執行非閑置線程時間的百分比

Wait Time%

處理器執行等待時間的百分比

       

 


 

表1  單用戶執行XX查詢

時間特性表

測試過程說明

測 試 結 果  (時間單位:秒)

用戶數

響應時間

XX查詢

1

51.77

資源特性表

最小值

平均值

最大值

數據庫服務器資源特性

內存

Memory

Real Free MBytes

4474.00

4479.05

4487.40

Virtual Free MBytes

16116.60

16116.60

16116.60

網絡Network Interface

Bytes Total/sec

0.00

11.36

393.00

磁盤

Physical Disk

Disk Read KB/s

0.00

5539.28

8437.50

Disk Write KB/s

0.00

21.99

339.80

處理器

Processor

CPU Time%

0.00

1.78

3.60

Wait Time%

0.00

13.67

17.30

應用服務器資源特性

內存

Memory

Available Swap KBytes

2045.60

2045.60

2045.60

Free Memory KBytes

49.40

49.44

49.50

網絡Network Interface

Bytes Total/sec

0.00

24.29

807.40

磁盤

Physical Disk

Disk Read KB/s

0.00

0.00

0.00

Disk Write KB/s

0.00

15.25

143.20

處理器

Processor

CPU Time%

0.00

0.26

4.00

Wait Time%

0.00

0.00

0.00

 

 

 


 

表2  20用戶並發執行XX查詢

時間特性表

測試過程說明

測 試 結 果  (時間單位:秒)

並發用戶數

成功用戶數

最小響應時間

平均響應

時間

最大響應

時間

90%響應

時間

XX查詢

20

20

82.29

83.15

84.42

83.60

資源特性表

最小值

平均值

最大值

數據庫服務器資源特性

內存

Memory

Real Free MBytes

4430.50

4963.65

6477.20

Virtual Free MBytes

16115.70

16116.97

16120.90

網絡Network Interface

Bytes Total/sec

2.40

175.82

2198.20

磁盤

Physical Disk

Disk Read KB/s

0.00

110732.71

196719.10

Disk Write KB/s

0.00

30.80

441.60

處理器

Processor

CPU Time%

0.10

23.30

59.00

Wait Time%

0.20

39.17

86.60

應用服務器資源特性

內存

Memory

Available Swap KBytes

2045.60

2045.60

2045.60

Free Memory KBytes

48.00

49.26

49.80

網絡Network Interface

Bytes Total/sec

0.00

494.85

6245.60

磁盤

Physical Disk

Disk Read KB/s

0.00

0.00

0.00

Disk Write KB/s

0.00

19.53

163.20

處理器

Processor

CPU Time%

0.00

2.70

36.80

Wait Time%

0.00

0.00

0.00

 


 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM