Data-driven testing at test case level
- An active Katalon Studio Enterprise (KSE) license. To learn more about activating your license, you can refer to this document: Activate Katalon license.
Data-driven testing (DDT) at test case level allows you to add data files and manage data binding at test case level. It helps you keep the data binding in the test case independent, regardless of the test suites it is added to.
- Perform data binding at test case level
- Execute that test case in a test suite
- View data-driven test reports
Bind data at the test case level
Before you perform data binding at the test case level, you need to prepare test data files and test case variables.
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 test execution. To learn more about creating new data files, refer to: Manage Test Data.
Create test case variables
Perform data binding
Handle data binding in called test cases
When a test case (for example, Test Case A) calls another test case (for example, Test Case B), the called test case does not automatically inherit data bindings or variable values from the main test case. To ensure Test Case B receives the appropriate data, you need to explicitly pass the variables during the call.
- Define variables in the called test case.
- Open the called test case (Test Case B).
- Navigate to the Variables tab.
- Click Add, then define the variables required for execution. For example, create a variable named
employee
.
- Call the test case and map variables.
Quick tips
With this setting, variables in the called test case will automatically appear for mapping when adding the Call Test Case step.
Execute test suite containing test case level data binding
View test reports
- When running a test suite that uses data binding at the test case level, the total number of executed test cases in test reports is the number of executed iterations. In the above example, we run a test case with 3 different sets of data, we can see the results of three executed test cases in the test reports.
Alternatively, you can also view your reports and details in <your-project-folder>/Reports
. Katalon Studio supports exporting test reports into different formats, such as HTML, CSV, PDF, and JUnit. You can learn more about exporting reports here: Generate reports.