Data driven testing

forData-driven testing (DDT) is a testing methodology in which test data is stored in a table or spreadsheet format, allowing testers to execute a series of tests using various data values without writing multiple test scripts for each data set. This approach is particularly useful in environments like Salesforce and Katalon Studio for several reasons:

In Salesforce Testing

Salesforce is a highly customizable platform with complex business logic, workflows, and user interactions that often require testing with multiple data sets to ensure comprehensive coverage.

A very cool feature is that you can use the queries as parameters in salesforce SOQL like e.g.

https://bsure-digitalbv-dev-ed.develop.my.salesforce.com/services/data/v60.0/query/?q=Select Name from Account

In Katalon Studio

Katalon Studio supports data-driven testing natively, making it a powerful tool for testing web, mobile, and API applications, including those built on Salesforce.

Why Use Data-Driven Testing in Salesforce and Katalon

Challenge, we are going make this hardcoded script datadriven via a csv

To make your script data-driven, you’ll need to modify it to use data from an external source, such as a CSV file, that Katalon Studio can read. This approach allows you to easily modify the test data without changing the script itself. Here’s a simplified example of how to refactor your script to be data-driven with Katalon Studio:

Modify Your Script to Use Test Data:

Replace the hard-coded values in your script with references to the data from your Test

It should now look like this.

Challenge:

Please run the script with the datadriven setup by running on the play button in the top corner.please fork and or download the template repo https://github.com/learn-automated-testing/Katalon_Salesforce_Course. Or just create your own repo and run this repo just as I showed.