Before have tried jmeter jdbc request, very convenient, this afternoon idle to nothing, see soapui inside also has a JDBC request, also come to try.
First, add a JDBC request, and then directly copy some of the link parameters of JMeter in the past, always error, unable to access the database. Then Baidu looked at the next, and finally to the official online to find the answer, recorded for sharing, after you encounter similar needs to use, you can not hit the head!
1. Add a JDBC Request
2. When you are finished adding, see the JDBC content page:
We need to add the driver and the connection string ourselves.
Note: The driver needs us to download, Mysql-connector-java-5.1.7-bin.jar, download, and put it directly under the Soapui Lib folder.
See the above connection method, I just said here is the connection mode of MySQL.
Driver:mysql/com.mysql.jdbc.driver ----> here is how Mysql drives the reference.
Connection string:jdbc:mysql://120.44.25.15:3306/test?user=root&password=123456 ----> here is how to concatenate the database strings. The following are special instructions:
The connection string is made up of the following methods:
jdbc:mysql://ip[database server IP Address]:p ort[port number]/database[database name]?user=[fill in the login database user name]&password=[password]
3. Click the Green: Test Connection button to see if the connection is successful, and if successful, you will see the following prompt box:
4. You can then enter the corresponding SQL statement in the input box below to see that the query was successful!
This is even if the connection and the use of success, if it is a complex SQL statement, you may need to study the stored procedures themselves, there is an option to check the stored procedures.
Hope can help everyone!
SoapUI's JDBC Request