Data driven testing in Katalon Studio
Katalon Studio allows data driven testing using various ways. Katalon can get value from data file, read the input from internal as well external files .
Katalon studio provides the possibility to save values of parameters globally and then use it in the test case during execution.
In this article we will discuss various ways in which data driven testing can be achieved in katalon:
You can read test data from external files such as excel files, CSV files, Database and use them in the test cases and do data binding.
Global Variables using Execution Profile in Katalon Studio
You can create multiple profiles in Katalon which are like different environments( eg: having a testing environment and a production environment).You can configure the environment using data and Global Variables.
Use Global Variable in Test:
Any test cases across a project can use global variables – for example, input data for keywords in Manual View using
Test Case Variables
- Katalon Studio provides the capability to create test case variables and assign values to them .
- These variables then can be used in the test case.
- There is no need to hard code the value of the variable in the test case itself.
- Create a test case.
- Go to the variable tab in the test case view.
- Click on Add button
- Enter the variable details as shown in the below screenshot.
5. Now you can directly use the variables declared here in the test case.
Using Java/groovy method to read files
Data specific to test cases can also be maintained outside in excel or csv files.
You can directly read the excel file by using custom methods in Keywords sections and using them in the test cases.
Example: in test case you can call the custom method created to read the file.