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.
- From Katalon Studio version 8.0.0 onwards, MySQL JDBC driver is removed from Katalon Studio built-in libraries. To continue using it, you can refer to this document: Implement DDT with MySQL.
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, 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 drivers and external JDBC driver. 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 | Version | Katalon Studio 7.0.0+ | Katalon Studio 7.5.0+ | Katalon Studio Enterprise 7.0.0+ | Katalon Studio Enterprise 7.5.0+ |
PostgreSQL | v42.2.17 | ✔ | ✔ | ✔ | ✔ |
Oracle SQL | v12.1.0.2 | ✔ | ✔ | ||
SQL Server | v6.2.2 | ✔ | ✔ |
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 having a JDBC (Java Database Connectivity) driver, you need to install its executable jar file accordingly then tell Katalon Studio where to use it for connection.
Connect to a database with a built-in driver
You have already set up your Postgre database.
Postgre database is running.
The following example shows you how to connect to a Postgre database that can be used in a whole project.
- Go to Project > Settings > Database.
- In Database:
- Select Secure User and Password to enable User and Password fields.
- Input the User and Password used for authentication.
- Enter 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 save your setting.
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.
An active Katalon Studio Enterprise license.