JMeter Test MySQL Database

Source: Internet
Author: User

After using JMeter to connect to the database, you can construct a request for database pruning in JMeter to test the database, following the MySQL database as an example to demonstrate the steps of JMeter connection to MySQL and process query operations.

1, ensure that the MySQL database can be connected properly, you can use the SQLyog tool connection test; Prepare the JDBC driver package for MySQL database: Mysql-connector-java.jar.

2. Build the following test plan to add the Mysql-connector-java.jar package to the test plan.

3, add the thread group, under which the JDBC Connection configuration is added, you can add more than one connection configurator, using variable name to differentiate. Specify the database URL, JDBC driver class, database connection user name, and password. Where test is the name of the database that needs to be connected.

Refer to the JMeter Help for specific field meanings and other database URL and driver classes. Such as:

4. Add the JDBC Request Sampler, specify the connection configuration used by variable name, select the type of query (add, delete, change, check, etc.), and fill in the query statement that needs to be tested.

5. Observe the success of the request by looking at the result tree (or in response to the assertion).

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.