使用性能測試工具JMeter來測試網站性能1

<!-- /* Font Definitions */ @font-face {font-family:宋體; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"/@宋體"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:宋體; mso-font-kerning:1.0pt;} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline; text-underline:single;} p {mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; mso-pagination:widow-orphan; font-size:12.0pt; font-family:宋體; mso-bidi-font-family:宋體;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->

核桃博客 轉載,http://www.hetaoblog.com/?p=48

使用性能測試工具JMeter來測試網站性能1

之前在網站性能測試工具Apache Benchmark的使用說明 介紹了使用Apache Benchmark來測試網站性能,這裏介紹另外一款強大的性能測試工具,可以克服Apache Benchmark的一些缺點,比如不支持流程控制、用戶登陸、圖形化報表輸出等功能;

JMeter也是Apache旗下的一個開源項目,地址是http://jakarta.apache.org/jmeter/ ,當前版本是2.3.4,下載到本地後,解壓,運行其中的bin/jmeter.bat,會得到如下界面:

測試一個簡單的web項目:

1. 右鍵點擊測試計劃,添加線程組,設置好線程數和循環次數

2. 右鍵線程組,添加->Sampler->HTTP請求,在詳細頁面上如何ip,端口和路徑

3. 右鍵線程組,添加->監聽器->用表格查看結果

完成配置後,JMeter結果如下,

按ctrl+s保存後,點擊運行->啓動,點擊用表格察看結果,有結果:

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章