Skip to main content

Data-driven testing in a test suite

This document shows you how to perform data-driven testing at the test suite.

Create a test data file

To create a test data file, go to File > New > Test Data. Katalon Studio allows you to use external or internal data sources. For this guide, you can create an internal data file with values as follows:

Test data file

For detailed instruction on creating internal data file, see Create an internal data file.

Create a test suite with test case variables

For this step, you need to create test case variables, then add the test case to a test suite.
  1. Go to File > New > Test Case to create a new test case.
  2. Go to the Script view and input the following script:
    println "${employee} - ${department} - ${position}"
  3. Switch to the Variables tab, click Add then input the following variables:
  4. When you're done, add the test case to a test suite.

Perform data binding in test suite

To perform data binding in a test suite, do as follows:
  1. In the test suite editor, click Show Data Binding.
    Show data binding

  2. Click on the test case, then select Use Variables and Binding at Suite Test Case.
    With this option, Katalon Studio will execute with the suite test case data binding.
  3. In the Test Data table, click Add to select data file(s).
    The selected file(s) is added to the table accordingly.

    Add test data

  4. In the Variable Binding table, select all rows, click Set Type , then select Data Column as their types.
    Set data type

  5. Click Set Test Data to select data files from the Test Data table.
    Set test data

  6. In the Value column, click on ... to specify the data field in the selected data file.
    Set test data value

    If the variables and selected data files column headers share the same name, you can click Map All to quickly map them together.

    Map all

  7. Once you're finished, save and run your test suite to see the following result:

See also