Manage data binding
Use this page to understand the Data Binding controls in a test suite. For a complete setup flow, see Data-driven testing in a test suite. To keep the binding with the test case across suites, see Data-driven testing at test case level.
Starting with Katalon Studio 11.7.0, data-driven test execution requires a paid plan. See pricing page.
In the test suite editor, select a test case, click Show Data Binding, then choose suite-level binding. The Test Data table controls which rows supply values; the Variable Binding table controls where each test case variable gets its value.
Test data table​
Add one or more test data files with Add, then use Data Iteration and Type to control which rows are combined. Each resulting set of row values runs as one test case iteration.
Add data files​
Click Add under Test Data section, choose files in the Test Data Browser, and click OK. Each file appears as a row in the table.
Modify data iteration​
Double-click a test data's Data Iteration cell to choose which rows it contributes:
| Option | Rows used |
|---|---|
| Run all rows | Every row in the file |
| Run from row ... to row ... | An inclusive range of row numbers |
| Run with specific rows | Listed rows or ranges, such as 1,2,3 or 1-5,9 |
Manage test data relationship​
When you add multiple files, the Type cell of each file controls how its selected rows combine with the other files. Click a Type cell to choose One or Many. One pairs rows by their position; Many combines rows with the other selected rows.
The examples below show how the choices change the number of iterations:
| File types | Example selected rows | Result |
|---|---|---|
| One, One | 3 names; 2 teams | 2 pairs: John–Marketing, Joe–Sales |
| Many, Many | 3 names; 2 teams | 6 name–team combinations |
| One, Many | 4 names; 2 teams | 8 name–team combinations |
| One, One, Many | 3 names; 2 teams; 2 titles | 4 combinations: each of the 2 name–team pairs with each title |
Use One for row-by-row pairing and Many when you need combinations. The number of selected rows in Data Iteration affects the final iteration count.
Variable binding table​
Select a test case in the suite to see its variables in Variable Binding. For each variable, choose a Type, then supply a data file and Value when that type requires them.
Type​
| Type | Value supplied to the variable |
|---|---|
| Data Column | The value under a named column in each selected data row |
| Data Column Index | The value at a column position; for example, 2 selects the second column |
| Default | The test case variable's default value |
| Script Variable | A scripting value selected in the Variable Value Builder |
Select the variable row and use Set Type to change its type.
Test Data​
For Data Column and Data Column Index, choose which file supplies the value. Select the variable row and use Set Test Data, or double-click its Test Data cell.
Value​
For Data Column, click ... in Value to choose the file's column. For Data Column Index, enter the column number. If a variable name matches a column name in the selected data file, Map All sets its Type to Data Column and binds it to that column. Bind variables with different names using Set Type, Set Test Data, and Value.
Bind to script variable​
Select the variable row, choose Set Type > Script Variable, then click ... in Value. In the Variable Value Builder, choose the scripting value and click OK.
