Table of contents
1.
Introduction
2.
Introduce database connection​
3.
Connect to a database with a built-in driver​
4.
Connect to a database with an external JDBC driver​
5.
Implement data-driven testing with MySQL
6.
Download MySQL library​
6.1.
Add an external JDBC driver for MySQL database connection​
7.
Frequently Asked Questions
7.1.
What is JDBC?
7.2.
What Database is used for data-driven testing?
7.3.
How do I import test cases in Katalon Studio?
7.4.
How do you create a test object in Katalon?
7.5.
How do I run the Katalon Studio test remotely?
8.
Conclusion
Last Updated: Mar 27, 2024

Set up database connection for data-driven testing and implementation in Katalon Studio.

Author Muskan Sharma
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Hey Readers!!

Have you ever wondered what to do when you want to add external test cases and use them?

In this article, you'll learn about these steps to perform for Setting up a database connection for data-driven testing and implementing it in Katalon Studio.

Now let's begin to explore this.

Set up database connection for data-driven testing and implementation in Katalon Studio.

Introduce database connection

  1. Go to Project > Settings > Database for setting up the global connection of database.
Database

Connect to a database with a built-in driver

1. Go to Project > Settings > Database. 

2. In Database: Follow these steps, then.

3. Select Secure User and Password.

4. Enter the connection URLuser name and password required for authentication.

5. To check if your Database is connected correctly, click Test Connection.

Test connection

6. To save your selection, click Apply and Close.

Connect to a database with an external JDBC driver

1. Download the external JDBC driver's executable.jar file. We've downloaded the MySQL Connector/J jar file from the maven repository.

2. To add the jar file, go to Project > Settings > Library Management and then click Apply.

Library Management

 

3. Then go the Project Settings, and then to Database, and fill in the details below:

Firstly select the Secure USER  and PASSWORD.

  • User
  • Password
  • Connection URL

Then click on Test connection to check whether the connection is established successfully or not.

Database
  • Click on Apply and Close, and your connection is established.

Must Recommended Topic, Schema in DBMS

Implement data-driven testing with MySQL

Now let's implement data-driven testing with MySQL. To do so, the steps are given below.

Requirements

  • Katalon Studio version 8.0.0 onwards. 
  • You already set up MyQSL Database. 
  • MySQL Database is running.

Download MySQL library

The MySQL executable.jar file can be downloaded. On the MySQL website, click here to download the MySQL library.

Add an external JDBC driver for MySQL database connection

1. Go to Project > Settings > Library Management to add the jar file and click Apply.

Library Management

2. Then go the Project Settings, and then to Database, and fill in the details below:

Firstly select the Secure USER  and PASSWORD.

  • User
  • Password
  • Connection URL

Then click on Test connection to check that the connection is established successfully or Not.

Database

3. Click on Apply and Close, and your connection is established.
Also Read - Cardinality In DBMS

Frequently Asked Questions

What is JDBC?

The JavaSoft specification for a common application programming interface (API) known as Java database connection (JDBC) enables Java programs to access DBMS.

What Database is used for data-driven testing?

Databases like data pools, DAO objects, and ADO objects are used for data-driven testing.

How do I import test cases in Katalon Studio?

Follow these steps for importing:

From the menu, Tools > Utility > Import Test Artifact.

How do you create a test object in Katalon?

There are two ways to create a test object :

First one is From the main menu, select file> New > Test Object Or Right-click on Object Repository > select New > Test Object.

How do I run the Katalon Studio test remotely?

Open Katalon Studio. Navigate to Project > Settings > Desired Capabilities > Remote > Enter the required information and then click OK.

Conclusion

This blog has extensively discussed Setting up database connections for data-driven testing and implementation in Katalon Studio. We hope this article helped enhance your knowledge about Connecting to a database with a built-in driver,Connecting to a database with an external JDBC driver, and Implementing data-driven testing with MySQL.

If you want to learn more deeply, check out the excellent content on the Coding Ninjas Website:

View and Customize Execution Logs and Capture screenshots in KatalonCheckpoints in Katalon StudioHow to Manage and execute test cases in dynamic test suites with Katalon Studio

Refer to our guided paths on the Coding Ninjas Studio platform to learn more about DSA, DBMS, Competitive Programming, Python, Java, JavaScript, etc. 

Refer to the links problemstop 100 SQL problemsresources, and mock tests to enhance your knowledge.

For placement preparations, visit interview experiences and interview bundle.

Thank You Image

Do upvote our blog to help other ninjas grow. Happy Coding!

Live masterclass