Skip to main content

Run Test Case with an external data source

Katalon Studio provides the ability to execute automation test with external data sources.

Create/Import test data files

To create a new data file, go to File > New > Test Data. Katalon allows you to use external or internal data sources for test execution. To learn how to create/import a new test data file to Katalon Studio, you can refer to this document: Manage test data. You can preview the imported test data as follows:

Test data file

Create a new Test Suite with Test Case Variables

Open a Test Suite, select Add from the command toolbar. All test cases in Katalon Studio will be displayed in the Test Case Browser dialog. The selected test case will be added to the test case list like the following example.

Add test case with variables to the test suite

Manage Data Binding

  1. In the test suite editor, click Show Data Binding to expand the Data Binding section with the Test Data and Variable Binding tables.

    Show data binding

  2. In the Test Data table, select Add > select the data to be used for execution > the selected test data are added to the list accordingly.

    Add test data

  3. In the Data Binding table which displays all variables of the selected test case, select all rows > choose Set Type > select Data Column as their types.

    Set data type

  4. Click Set Test Data to decide which test data from the list to be used for execution.

    Set test data

  5. Click each cell in the Value column to specify the data field in the selected data file. For example:

    Set test data value

    • If the variables and the data field in the selected data files share the same name, you can quickly map all the variables with the data fields in the data file by clicking Map All. For example, with this function, the 'Employee', 'Department', and 'Position' variables automatically map with the 'Employee', 'Department', and 'Position' columns of the test data.

      Map all

  6. After finishing all the steps above, save and run your test suite to see the following result:

    Log viewer

See also