JMeter connection mysql and SQL Server configuration

Source: Internet
Author: User
Tags sql server driver

Download the JDBC Driver

When using JMeter for performance or automated testing, you often need to put pressure on the database directly, or some parameters can only be obtained from the database, you must use JMeter to connect to the database.

1. Download the corresponding driver package

MySQL driver: (Mysql-connector-java-5.1.13-bin.jar may now have a new version), and put it in the JMeter directory under the Lib file, after copying, restart JMeter

Links: http://download.csdn.net/source/3451945

SQL Server driver: Sqljdbc4.jar, the same needs to be placed in the JMeter directory under the Lib file, after replication, restart JMeter

Links: http://download.csdn.net/detail/javaservletsql2008/4859165

Connect MySQL Settings

1, configure the driver, test plan lower right corner, click Browse, select the JDBC driver

2. Add Thread Group

Open JMeter to create a thread group. Right-click Test Plan---> Add--->threads---> Thread Group

3. Configure JDBC

In-thread group, right-click to add a configuration component---> "JDBC Connection Configuration"

4. Configuring the JDBC Connection configuration

1) varible Name: This is the name of the variable, which means it cannot be duplicated.

2) JDBC Url:jdbc:mysql://1920168.0.1:3306/idmdb, where 1920168.0.1:3306: The address and port number of this database; Idmdb, this is the database name of the test. 3) Driver Class:org.gjt.mm.mysql.Driver or com.mysql.jdbc.Driver This is a fixed value of 4) Username: Login name for this database 5) Password: This is the login password for the database

5. Add JDBC Request

Right-click on "Thread Group" and add a "JDBC Request" below, where the variable name name must be the same as the JDBC configuration

6. Implementation results

Connect SQL Server Settings

Unlike the MySQL settings, it is 4, configuring the JDBC Connection configuration other consistent

(1) This value is also used in subsequent JDBC request Variable name:test.

(2) Database URL:jdbc:sqlserver://192.168.1.2:1222; DatabaseName=DBname (requires semicolon-separated, MySQL is/);

(3) JDBC Driver Class:com.microsoft.jdbc.sqlserver.SQLServerDriver (This is also a fixed notation);

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

The Configuration reference table for the Database URL (also available in JMeter's help) is shown below:

Configuring the JDBC Connection configuration

JMeter connection mysql and SQL Server configuration

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.