JMeter connecting SQL Server database for stress testing

Source: Internet
Author: User

Prerequisites: Install the JDBC driver First

Driver download link address :http://pan.baidu.com/s/1bpDpjSr Password:v6tn

after downloading the decompression, say sqljdbc4.jar place jmeter installation directory /lib ; restart after copying JMeter;

1. test Plan -Configure drivers

The bottom right corner of the test plan, click Browse, select the jdbc driver

650) this.width=650; "Src=" http://img.blog.csdn.net/20161012185928700?watermark/2/text/ Ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/center "Style=" Border:none;height:auto; "/>

2. add a thread group

Right-click the test Plan --add--Thread--Threads Group

650) this.width=650; "Src=" http://img.blog.csdn.net/20161012185939732?watermark/2/text/ Ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/center "Style=" Border:none; "/>

3. Add configuration element JDBC Connection Config

650) this.width=650; "Src=" http://img.blog.csdn.net/20161012185947895?watermark/2/text/ Ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/center "Style=" Border:none;height:auto; "/>

4. Configure the JDBC Connection configuration

650) this.width=650; "Src=" http://img.blog.csdn.net/20161012185958973?watermark/2/text/ Ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/center "Style=" Border:none;height:auto; "/>

The parameters that need to be configured are:

(1) Variable name: test   Span style= "font-family: ' The song Body '; > follow jdbc Request

(2) Database url: jdbc:sqlserver : //192.168.1.2:1222 ; DatabaseName = DBname   ( > Everybody write what's right, I'll write it for convenience. ip: port number );

(3) JDBC Driver class:com.microsoft.jdbc.sqlserver.SQLServerDriver (SQL Server fixed notation, different for each database );

(4) Username the user name and password of the Password database;

The Configuration reference tablefor the Database URL (also available inJMeter 's help ) is shown below:

650) this.width=650; "Src=" http://img.blog.csdn.net/20161012190033498?watermark/2/text/ Ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/center "Style=" Border:none;height:auto; "/>

5. Add JDBC Request

650) this.width=650; "Src=" http://img.blog.csdn.net/20161012190152156?watermark/2/text/ Ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/center "Style=" Border:none;height:auto; "/>

6. Configure the JDBC Request parameter

650) this.width=650; "Src=" http://img.blog.csdn.net/20161012190046599?watermark/2/text/ Ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/center "Style=" Border:none; "/>

7. Adding listeners

650) this.width=650; "Src=" http://img.blog.csdn.net/20161012190208985?watermark/2/text/ Ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/center "Style=" Border:none; "/>

8. run to see the results

650) this.width=650; "Src=" http://img.blog.csdn.net/20161012190221079?watermark/2/text/ Ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/center "Style=" Border:none; "/>

9. stress test on query conditions

Thread group threads and loops are all 1;

selected JDBC Request Right-click Insert ancestor--Logic controller--loop controller

650) this.width=650; "Src=" http://img.blog.csdn.net/20161012190231412?watermark/2/text/ Ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/center "Style=" Border:none;height:auto; "/>

Set loop controller cycle times

650) this.width=650; "Src=" http://img.blog.csdn.net/20161012190250006?watermark/2/text/ Ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/center "Style=" Border:none;height:auto; "/>

The results can be viewed through the monitor -aggregation report;


This article from the "32 Krypton" blog, reproduced please contact the author!

JMeter connecting SQL Server database for stress testing

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.