利用Jmeter向MySQL批量插入資料

來源:互聯網
上載者:User

標籤:jmeter   效能測試   

1.   啟動Jmeter

2.   添加 DBC Connection Configuration

右鍵線程組->添加->配置元件->JDBC Connection Configuration

 

650) this.width=650;" src="http://s2.sinaimg.cn/mw690/005NDN77gy723CyxNW9f1&690" height="325" width="558" name="image_operate_2841464491320697" alt="JMeter <wbr>利用Jmeter批量資料庫插入資料" title="JMeter <wbr>利用Jmeter批量資料庫插入資料" style="margin:0px;padding:0px;border:0px;list-style:none;" />

 

添加後進行必要的配置


3.   添加參數化所需變數

 

650) this.width=650;" src="http://s4.sinaimg.cn/mw690/005NDN77gy723CGcKJ5e3&690" name="image_operate_40941464490961944" alt="JMeter <wbr>利用Jmeter批量資料庫插入資料" title="JMeter <wbr>利用Jmeter批量資料庫插入資料" style="margin:0px;padding:0px;border:0px;list-style:none;" />

配置

 

650) this.width=650;" src="https://s4.51cto.com/wyfs02/M00/9D/10/wKioL1l5lxnQpkvHAAAxSO5tvTs171.png" title="sp170727_153229.png" alt="wKioL1l5lxnQpkvHAAAxSO5tvTs171.png" />
 

4.   添加JDBC Request

右鍵線程組->添加->Sampler->JDBC Request

 

650) this.width=650;" src="http://s4.sinaimg.cn/mw690/005NDN77gy723D00Nh1c3&690" height="384" width="538" name="image_operate_86891464491037560" alt="JMeter <wbr>利用Jmeter批量資料庫插入資料" title="JMeter <wbr>利用Jmeter批量資料庫插入資料" style="margin:0px;padding:0px;border:0px;list-style:none;" />

 

配置:

 

650) this.width=650;" src="https://s5.51cto.com/wyfs02/M01/9D/10/wKiom1l5l1zxEP_WAABMv7UWbQ8566.png" title="sp170727_153336.png" alt="wKiom1l5l1zxEP_WAABMv7UWbQ8566.png" />


4.1插入一千條資料

650) this.width=650;" src="https://s4.51cto.com/wyfs02/M01/9D/10/wKioL1l5l4fDFnCYAAAn3EehkOw074.png" title="sp170727_153420.png" alt="wKioL1l5l4fDFnCYAAAn3EehkOw074.png" /> 

5.   添加查看結果樹

 

 650) this.width=650;" src="http://s6.sinaimg.cn/mw690/005NDN77gy723DiTvlbe5&690" height="501" width="558" name="image_operate_61211464491681057" alt="JMeter <wbr>利用Jmeter批量資料庫插入資料" title="JMeter <wbr>利用Jmeter批量資料庫插入資料" style="margin:0px;padding:0px;border:0px;list-style:none;" />

6.   最後如下,對線程組進行必要的配置後,運行查看

 650) this.width=650;" src="https://s5.51cto.com/wyfs02/M00/9D/10/wKiom1l5l7fi5Q6WAAAhBR1jomw060.png" title="sp170727_153504.png" alt="wKiom1l5l7fi5Q6WAAAhBR1jomw060.png" />

 


本文出自 “32氪” 部落格,轉載請與作者聯絡!

利用Jmeter向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.