jmeter call mysql database using JDBC implementation of the relevant SQL request

Relatively simple one call, where to use an external Library (mysql-connector-java) , various versions of the Download Address: https://mvnrepository.com/artifact/mysql/mysql-connector-java   

Note: The download version needs to be equal or higher than the version of the database connections, database version lower than words will complain

Step 1 is introduced in the test program downloaded mysql-connector-java, test plan page> Click Browse> Locate the downloaded mysql-connector-java File> Open:

 

 

 Step 2 Add thread group, add the configuration element JDBC Connection Configuration, thread group> element arranged> JDBC Connection Configuration:

 

 Step 3 Configure JDBC Connection Configuration to connect database: Database address, connection Mysql driver, accounts, passwords, need to connect to the database name

 

 

Step 4 of this kind, even if the connection is good, we do request a test, add JDBC Request:

 

 

Step 5 write a simple sql:

 

 

Step 6 Add the result tree, view the results under execution:

 

 

This completes a connection to the database and query, and the need to learn from each other, improve together

Guess you like

Origin www.cnblogs.com/huahuage/p/12517344.html