Skip to main content
Version: current

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.

Note:
  • Starting from Katalon Studio version 6.3.0, you can configure variable binding to read test data values as the intended data types. Forthis document an example of Variable binding for Test Data with option bind into test case as string enabled/disabled, refer to Enhanced Variable Binding in Katalon Studio.

Create an Excel Test Data File

To create an Excel test data file, follow these steps:
  1. Select File > New >Test Datafrom 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 also choose the sheet you want to use.

    Data file editor in Katalon Studio
  4. Save the Test Data when you finish.
You have successfully created an Excel data file. This data file can be utilized in other configurations. For example, you can use it to input data for test execution when setting up test suites.

Create a CSV Test 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 Internal Data. 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 utilized in other configurations. For example, you can use it to input data for test execution when setting up test suites.

Create a Database Data File

  • You have already set up your database. For a database availability check, refer to Supported databases.

  • Your database is running.

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 Internal 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 OK.
    Database Connection and Query Settings dialog in Katalon Studio
    Starting from Katalon Studio version 7.0.0 and later, you can query data from additional database sources with the JDBC Driver field in the dialog. You can enter the ClassDriverName of the database with a library support connection (JDBC).
    Note:

    You can check Use global database connection settings to use the connection defined in project settings. Refer to Database Settings for more details.

  4. Queried data is fetched and loaded into the preview section below.
    Data file editor in Katalon Studio
  5. Save the Test Data when you finish.
You have successfully created a database data file. This data file can be utilized in other configurations. For example, you can use it to input data for test execution when setting up test suites.

Create an Internal Test 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 utilized in other configurations. For example, you can use it to input data for test execution when setting up test suites.