SoapUI Tutorial on SoapUI JDBC Connection

soapui allows managing database operation using a teststep called jdbc request.

step 1 − right-click on teststep and select add step → jdbc request.

jdbc request

step 2 − enter the step name and click ok.

new step

jdbc step is added. double-click step, and the jdbc wizard will open.

jdbc wizard

to create a jdbc connection, the user needs to provide valid driver and connection string. these parameters are used to identify the type of database and create a connection to use the database.

for mysql, database driver can be com.mysql.jdbc.driver. similarly, for other database, there is a predefined driver that can be found by the document section of the database.

step 3 − connection string should be in the following format −

jdbc:mysql://[host]:[port]/[database]?[property][=value] 

here, property is the username and password along with other parameters required to connect with a database.

for example,

jdbc:mysql://localhost:8089/xxx_db?user=root&password=root 

step 4 − click test connection. on successful connection, it will display success otherwise provide the details of failure.

test connection