JMeter complete a MySQL stress test

Source: Internet
Author: User
Tags postgresql

JMeter can also be used for database stress testing, and compatible with various database types, only the corresponding database driver classes and URLs need to be changed. The following is the URL for the database-driven class to be organized. and give a simple application of MySQL database select. As follows:

A different database-driven class and the corresponding URL:

Datebase

Driver class

Database URL

Mysql

Com.mysql.jdbc.Driver

Jdbc:mysql://host:port/{dbname}

PostgreSQL

Org.postgresql.Driver

Jdbc:postgresql:{dbname}

Oracle

Oracle.jdbc.driver.OracleDriver

Jdbc:oracle:thin:user/[email Protected]//host:port/service

Ingres (2006)

Ingres.jdbc.IngresDriver

Jdbc:ingres://host:port/db[;attr=value]

MSSQL

Com.microsoft.sqlserver.jdbc.SQLServerDriver

Or

Net.sourceforge.jtds.jdbc.Driver

Jdbc:sqlserver://ip:1433;databasename=dbname

Or

jdbc:jtds:sqlserver://localhost:1433/"+" library "

Two MySQL SELECT statement stress test Case:

1 Adding a JDBC request

1) Enter JMeter path bin, double hit Open jmeter.bat

2) Add a thread group: edit, add a->threads-> thread group

3) Add a JDBC request for the thread group: Select Thread Group, add->SAMPLER->JDBC request

Fill in the corresponding test statements, additions and deletions are set in query type.

4) Add the JDBC configuration symbol: Add, configure component->jdbc Connection configuration

5) You can add a listener to test it.

2 question: "Response message:java.sql.SQLException:No suitable driver found Forxxx", as

FIX: Missing driver, download mysql-connector-java-gpl-5.1.37,:http://dev.mysql.com/downloads/file.php?id=459311

Put it under the Jmeter/lib and run again will find Ding-dong, become

3 Note: If necessary, please save JMeter pure version (initial download status), my jmeter took too long to add too many things, how to run will prompt this "problem", download the new JMeter no longer this problem.

JMeter complete a MySQL stress test

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.