Skip to main content

Manage test data

Katalon Studio allows you to use data from multiple sources to run data-driven tests, including:
  • External data: You can import data files in Excel and CSV format, or from database servers.

  • Internal data: You can input the data manually within Katalon Studio. You can decide the number of columns, rows, and what values for each cell.

This document shows you how to create test data files with external and internal data in Katalon Studio.

Create an Excel data file

To create an Excel test data file, follow these steps:
  1. Select File > New > Test Data from the main menu.
    The New Test Data dialog appears as below. Enter the name for your test data and select Data Type as Internal Data. Click OK.

    The new test data dialog appears in Katalon Studio

  2. Browse to the Excel file that you want to import into Katalon Studio.
    Browse file in Katalon Studio
  3. Data from the selected Excel file is loaded into the preview section below.

    You can choose the sheet you want to use.

    Data file editor in Katalon Studio
    Note:
    • By default, Katalon Studio converts variables to strings to perform data binding. You can disable Bind to test case as string option to configure variable binding to read test data values as the intended test data types.
  4. Save the Test Data when you finish.
You have successfully created an Excel data file. This data file can be used in other configurations. For example, you can use it to input data for test execution when setting up test suites. See: Manage Data Binding.

Create a CSV data file

To create a CSV test data file, follow these steps:
  1. Select File > New > Test Data from the main menu.

    The New Test Data dialog appears as below. Enter the name for your test data and select Data Type as CSV File. Click OK.

    The new test data dialog appears in Katalon Studio

  2. Browse to the CSV file that you want to import into Katalon Studio.
    Browse file in Katalon Studio
  3. Data from the selected CSV file is loaded to the preview section below.
    Data file editor in Katalon Studio
  4. Save the Test Data when you finish.
You have successfully created a CSV data file. This data file can be used in other configurations. For example, you can use it to input data for test execution when setting up test suites. See: Manage Data Binding.

Create a Database data file

To create a database data file, follow these steps:
  1. Select File > New > Test Data from the main menu.
    The New Test Data dialog appears as below. Enter the name for your test data and select Data Type as Database Data. Click OK.

    The new test data dialog appears in Katalon Studio

  2. Click Edit Query to open the Database Connection and Query Settings dialog.
    Database query in Katalon Studio
  3. Enter the connection details and the data query. Click Test Connection to verify whether your database is connected successfully.
    Database Connection and Query Settings dialog in Katalon Studio
    In the JDBC Driver field, you can enter the ClassDriverName of the database with a library support connection (JDBC) toquery data from additional database sources.
    Note:

    You can check Use global database connection settings to use the connection defined in project settings. See Database Settings.

  4. Click OK. The queried data is fetched and loaded into the preview section as below.
    Data file editor in Katalon Studio
    Note:
    • By default, Katalon Studio converts variables to strings to perform data binding. You can disable Bind to test case as string option to configure variable binding to read test data values as the intended test data types.
  5. Save the Test Data when you finish.
You have successfully created a Database data file. This data file can be used in other configurations. For example, you can use it to input data for test execution when setting up test suites. See: Manage Data Binding.

Create an Internal data file

To create an internal test data file, follow these steps:
  1. Select File > New > Test Data from the main menu.

    The New Test Data dialog appears as below. Enter the name for your test data and select Data Type as Internal Data. Click OK.The new test data dialog appears in Katalon Studio

  2. In the Editor View, select the option to add a new column.
  3. Select the option to add a new row.
  4. Click on each cell to input the value for them.
  5. Right-click to access the context menu to edit or delete the columns (or rows).
  6. Save the Test Data when you finish.
You have successfully created an internal data file. This data file can be used in other configurations. For example, you can use it to input data for test execution when setting up test suites. See: Manage Data Binding.
Was this page helpful?