Connecting Feature File with Data Files


#1

If I have a scenario in a feature file (so in the test suite, I’m just putting the path to the feature):

Given I do this
When I do that for
Then this will happen

Examples:
| specificThing |
| moon |

How do I modify this to where the specificThing points to a DataFile if the data file was imported from an excel sheet?

For instance for a conceptual understanding of what I’m saying:
Given I do this
When I do that for
Then this will happen

Examples:
runDataFile(“datafile”)


#2

You can use ‘specificThink’ as the name of a DataFile. After that, in the step definition, you use API to get the DataFile out, processing its content and do next step.


#3

I think I was not specific in my original post or maybe I am a bit confused, but I am getting the data from an excel sheet and in the test suite, I am just calling it as a path.


#4

I think you could try to get the data by using API