Tag: set operation an ima src es2017 picture Execute Query
first, the environment preparation:
1. Prepare a database containing the necessary data;
2, JDBC driver;
second, the operation steps:
1, add the JDBC driver;
2, add "thread Group", and add a "JDBC Connection Configuration" below;
3, configure the JDBC Connection configuration page, enter the database
1) database url:jdbc:mysql://localhost:3306/hkktest, where Hkktest is the name of the databases;
2) Username and password fill in the correct account and password;
4, add JDBC Request under the thread group;
5, the JDBC request writes the SQL statement, and chooses the correct type;
6, it should be noted that this setting can only write a single statement, if you try to execute multiple types of SQL statements, there are the following two scenarios:
Programme one:
1) First, set up the stored procedure and take care not to execute the call statement;
2) Perform the operation in the JDBC request of JMeter;
When you click "Start", you find that the database data response has changed.
Scenario two: In the JDBC Connection configuration page, Database url:jdbc:mysql://localhost:3306/hkktest add after? allowmultiqueries=true , and then select the query type in the JDBC request as callable Statement.
7. Add response assertion, assertion result, graphical result, view result tree;
1) SQL statement: SELECT Name from students where id= ' 801 ';
2) Expected results:
3) JMeter operation result:
JMeter implementing MySQL Multi-type SQL statement requests