Set up Database Connection for Data-Driven Testing

From v8.0 onwards, MySQL's JDBC Driver is removed from Katalon Studio's built-in libraries. To continue using it, follow this guide.

This document gives you information on which database can be used for Data-driven testing and how to set up the database connection in Katalon Studio.

Introduce Database Connection

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. Learn more

To set up a global database connection, go to Project > Settings > Database.

Where:

  • 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:

You can set up a connection to one of those three database types with its executable jar file already embedded. Refer to the following table for an availability check:

 

 

Katalon Studio version

MySQL

PostgreSQL

Oracle SQL

SQL Server 

Katalon Studio license

7.0+

v8.0+

all versions

N/A

N/A

7.5+

Katalon Studio Enterprise license

7.0+

all versions

2008 - 2016

7.5+

2008 - 2017



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.

For those who wish to connect to an external database having a JDBC 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

The following example illustrates how to connect to a Postgre database that can be used in a whole project.

Requirements:

  • You have already set up your Postgre database.
  • Postgre database is running.

To establish a connection, go to Project > Settings > Database. In Database:

  1. Select Secure User and Password to enable User and Password.

  2. Input User name and Password used for authentication and Connection URL.

  3. Click Test Connection to verify whether your database is connected successfully.

  4. Click Apply and Close to save your setting.

Connect to a database with an external JDBC driver

This section provides a usage example by connecting to MariaDB, a database with an external JDBC driver.

Requirements:

  • You have already set up MariaDB.
  • MariaDB is running.
  • An active Katalon Studio Enterprise license.

To start the connection:

  1. Download the executable jar file of the MariaDB library here.

  2. Go to Project > Settings > Library Management to Add the jar file > click Apply.

  3. In Project Settings, go to Database:

    • Select Secure User and Password to enable User and Password.

    • Input User name and Password used for authentication and Connection URL.

    • Enter JDBC Driver.

    • Enter Connection URL.

    • Click Test Connection to verify whether your database is connected successfully.

    • Click Apply and Close to complete the connection process.

Next: See Manage Test Data

Feedback