How to achieve passing multiple values from a data sheet to a Cucumber feature file

Hello,

How to achieve passing multiple values from a data sheet to a feature file.

Example : Consider the below scenario

Scenario: Test the login and logout GMAIL functionality of bulk users (Say suppose 100 users)
Given I navigate to the login page
When I enter the username as “xyz@gmail.com” and password as “Pass@123
And I click the login button
And I should see the home page
Then I should logout and close browser

Here instead of hard coding the value username as "xyz@gmail.com" and password as “Pass@123” and also without using Examples , how to read the values from the data sheet in a feature file.

Using Examples : We have to enter 100 users , instead how to read the values from the data sheet in a feature file.

Regards,
Rajesh

Hi Rajesh,

May I know what kind of feature file you are using?? Is it excel? csv? other??

If excel, the below link will help. Kindly see:
https://docs.katalon.com/katalon-studio/tutorials/data_driven_testing.html#what-is-data-driven-testing

Hope that helps. . . :slight_smile:

Hi Arnel,

I am using excel data set.

How can i retrieve the data set values from excel to the feature file.
Right now we are using Examples and achieving this , but i dont want to use Examples and want to read the values directly from dataset like how we do in groovy (Ex : var= findTestData(‘DataTableName’).getValue(1, 1)

Regards,
Rajesh M

Hi Rajesh,

Okay then, try this:

1 Like

Hi Rajesh,

Please let me know if you were able to achieve this. I’ve similar kind of requirement.

Thanks,
Arpita