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:
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.
Manage Data Binding
In the test suite editor, click Show Data Binding to expand the Data Binding section with the Test Data and Variable Binding tables.
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.
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.
Click Set Test Data to decide which test data from the list to be used for execution.
Click each cell in the Value column to specify the data field in the selected data file. For example:
- 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.
After finishing all the steps above, save and run your test suite to see the following result: