【JMeter】(3)---MySQL壓測

來源:互聯網
上載者:User

標籤:資料庫驅動   password   value   color   參數類型   add   http   for   alt   

JMeter---MySQL壓測

 

一、添加MySQL驅動jar包

       在測試計劃(Test Plan)頁面添加jar包

 

二、添加MySQL串連配置

  添加線程組右擊-->添加(add)-->配置元件(config element)-->JDBC connection configuration

核心配置

     variable name for created pool(已建立池的變數名稱)

     Max Number of connections : 最大串連數

     MAX wait :最大等待時間

     Auto Commit: 是否自動認可事務

     DataBase URL : 資料庫連接地址 jdbc:mysql://127.0.0.1:3306/blog

     JDBC Driver Class : 資料庫驅動,選擇不同資料庫對應的驅動

     username:資料庫使用者名稱

     password:資料庫密碼

 

三、添加JDBC Request

       首先是添加線程組,然後右擊-->添加-->Samplar-->JDBC Request

參數講解:(注意:上面的sql結尾不要加";")

       variable name of pool declared in JDBC connection configuration(注意:這裡要和上面的variable name for created pool裡面一致)

      Query Type :查詢類型

      parameter values: 參數值

      parameter types :參數類型

      variable names :sql執行結果變數名

      result variable names: 所有結果當做一個Object Storage Service

      query timeouts:  查詢逾時時間

      handle results :處理結果集

 

 執行不同語句選擇不同的Query Type

 資料庫資訊

 

四、運行結果 

 

 說明資料庫壓測成功

 

 

 想太多,做太少,中間的落差就是煩惱。想沒有煩惱,要麼別想,要麼多做。中校【1】

 

【JMeter】(3)---MySQL壓測

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.