Configure database connection for data-driven testing in Katalon Studio
This document gives you information on which database can be used for data-driven testing and how to set up a database connection in Katalon Studio.
Starting with Katalon Studio 11.7.0, data-driven test execution requires a paid plan. Free-plan users cannot run data-driven tests, including Test Suite Collections in which any suite uses data binding.
Database connection settings​
To do data-driven testing with a database, you can define a database connection that can be used for the whole project and override this global configuration in a test data file later.
To set up a global database connection, go to Project > Settings > Database.
The configuration includes the following fields:
- Secure User and Password: Select to authenticate the connected database server. This option is disabled by default.
- User: The username for authentication in the connected database server.
- Password: The password for authentication in the connected database server.
- JDBC Driver: The ClassDriverName of the database that has a supported library connection (JDBC).
- Connection URL: The connection string of the database server. Katalon Studio supports built-in JDBC drivers for the following databases:
- Set Connection Properties for JDBC Driver: Set the desired connection properties for your JDBC driver, if any. The properties are applied for built-in and external JDBC drivers. To learn about the supported connection properties, see Connection properties recognized by Oracle JDBC Drivers.
You can set up a connection to one of the three databases with its executable JAR file already embedded. Refer to the following table for an availability check:
| Built-in Database | Before Katalon Studio 10.3.1 | Katalon Studio 10.3.1+ |
|---|---|---|
| PostgreSQL | v42.2.17 | v42.7.7 |
| Oracle SQL | v12.1.0.2 | ojdbc11 v21.18.0.0 |
| SQL Server | v6.2.2 | v12.6.4.jre11 |
In case you want to use a version other than the version those built-in drivers are compatible with, learn more about excluding built-in libraries.
If you want to connect to an external database with a JDBC (Java Database Connectivity) driver, install its executable JAR file, then tell Katalon Studio where to use it for the connection.
Connect to a database with a built-in driver​
For PostgreSQL, Oracle SQL, and SQL Server, Katalon Studio includes a JDBC driver, so you do not need to add a driver JAR to the project. Make sure your database is running, then use the database connection settings above to configure a project-wide connection. Enter the Connection URL, provide credentials if your database requires authentication, and add any connection properties you need. Click Test Connection to verify the connection, then Apply and Close to save it.
The following screenshot shows a PostgreSQL connection using the built-in driver:
Connect to a database with an external JDBC driver​
This section demonstrates how to set up the connection to a database with an external JDBC driver.
- You have already set up an external JDBC driver.
- The external JDBC driver is running.
-
Download the executable JAR file of the external JDBC driver. For example, to connect to the MariaDB Java Client driver, download its library from the Maven Repository website: MariaDB Java Client.
Note: You can connect Katalon Studio with the SAP HANA JDBC driver. Go to the Maven Repository website to download: SAP HANA JDBC Driver.
-
Go to Project Settings > Library Management. Click Add to add the JAR file to the external library.
-
In Project Settings, go to Database to configure the database connection.
- Select Secure User and Password to enable the User and Password fields.
- Input the User and Password used for authentication.
- Enter the Connection URL.
- Add Connection Properties for JDBC Driver, if any.
-
Click Test Connection to verify whether your database is connected successfully.
-
Click Apply and Close to complete the connection process.