JMeter Initial learning-connect to JDBC

Source: Internet
Author: User

JMeter is a pure Java write that can be used for both functional testing and stress testing. Not only can he test the web, but he can test the DB, and the most recent project uses a connection to JDBC:

Note the point:

(1) The JDBC driver of the database to be connected is required to be placed in the JMeter lib.

Scenario: Stress testing the Web app and MySQL database using JMeter

JMeter is a very powerful test tool that can be used to test the Web, database, since 07 has been used for it has been a unique, the following record in a project on its simple use.

Project Sub-database testing and Web application testing

Database testing is relatively simple, the JDBC driver of the database to be tested is placed into the JMeter Lib folder, a new thread group, 100 threads configured, 10 cycles, 10 seconds to start all threads, and a JDBC connection configuration, Add the crud action you want to make, click the Start button, and then look at performance through the summary report.

Set up a thread group, start 100 threads (10s), each thread loops through all steps 10 times, and a step error continues:

JDBC Connection configuration:

In Crud C, because some fields of data require uniqueness, a counter (counter) is added to guarantee the uniqueness of the field in the database:

Counter:

Execution Ctrl+r, in summary report can see the test data summary

You can see the interaction of each request in the view result tree to facilitate debug

More debug, you can use the JMeter interface, Options-"Log viewer to help debug JMeter run-time problems encountered, want to display more log in the log viewer, you can modify the Bin folder under the Jmeter.properties

Log_level.jmeter=info
Log_level.jmeter.junit=debug
#log_level. Jmeter.control=debug
#log_level. Jmeter.testbeans=debug
#log_level. Jmeter.engine=debug
#log_level. Jmeter.threads=debug
#log_level. Jmeter.gui=warn
#log_level. Jmeter.testelement=debug
#log_level. Jmeter.util=warn
#log_level. Jmeter.util.classfinder=warn
#log_level. Jmeter.test=debug
#log_level. Jmeter.protocol.http=debug
# for Cookiemanager, AuthManager etc:
#log_level. Jmeter.protocol.http.control=debug
#log_level. Jmeter.protocol.ftp=warn
#log_level. Jmeter.protocol.jdbc=debug
#log_level. Jmeter.protocol.java=warn
#log_level. Jmeter.testelements.property=debug
Log_level.jorphan=info

Transferred from: http://blog.csdn.net/cloud_ll/article/details/35771501

JMeter Initial learning-connect to JDBC (go)

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.