# Data Driven Tests

There a many times where you'll want to run the same steps with different input data. Gondola supports this using JSON or CSV formatted files. There are two ways in which Gondola works with data files.

  1. The test case runs for each object (JSON) or row (CSV) in the data file.
  2. Internal loop: a portion of the test case iterates through the data with a loop.

# Data Files

# Location

Data files should be stored under the data folder in the project root.
Data files located in the data folder

# JSON format

[
    {
        "firstName": "john",
        "lastName": "doe",
        "password": "",
        "driverLicense": "CA123456",
        "passport": "830537258",
        "phoneNumber": "1-325-324-5553"
    },
    {
        "firstName": "david",
        "lastName": "baker",
        "password": "123456",
        "driverLicense": "CA654321",
        "passport": "942058316",
        "phoneNumber": "2-856-524-8636"
    }
]

# CSV


firstName,lastName,password,driverLicense,passport,phoneNumber
john,doe,,CA123456,830537258,1-325-324-5553
david,baker,123456,CA654321,942058316,2-856-524-8636

# Method 1 Looping the Entire Test Case

# Method 2: Internal Loop

Last Updated: 8/14/2020, 12:49:56 PM