Data Driven Testing is a Test design and execution strategy where the test scripts read test data from data sources (file or database) such as ADO objects, ODBC sources, CSV files, JSON etc. rather than using hard-coded values.
Data driven testing means to execute your test case multiple times with different inputs and validation values. Cucumber inherently supports Data Driven Testing using Scenario Outline and example but with power of Java you can not limit Cucumber data driven testing to just feature file.
When you have large amount of data it is recommended to use external file otherwise you can use scenario outline.
There are different ways to use the data insertion with in the Cucumber and outside the Cucumber with external files:
- Sending Test Data in Steps using multiple arguments
- Cucumber Data Driven Testing with Scenario Outline and Example Keyword
- Cucumber Data Driven Testing using Data Tables
- Comparing Data Table with any Other type of Table
- Cucumber Data Driven Testing using Maps in Data Tables
- Cucumber Data Driven Testing using Excel Files
- Cucumber Data Driven Testing using XML
- Cucumber Data Driven Testing using JSON
- Share data between steps in Cucumber using Scenario Context