Data Driven - Working with multiple data sets

I want to use different data sets which are pulled from a single json file. My json file is like below:

[{
  "scenario": "scenario1"
}, {
  "scenario": "scenario1"
}, {
  "event": "event1"
}, {
  "event": "event2"
}]

However, it only gets the scenario pairs. Is there a way to put all my data inside 1 json file?

Hey @batuarslan,

Are you able to expand on this a bit more - What’s the use case?

You might need to show how you’re using the variables in your tests, to give other folks an idea where to begin offering help :slight_smile:

1 Like

Hi, the use case is that I have to use dava driven in some tests but I want to store these data in the same file so that I will have to provide only 1 json file on runner. If I provide multiple data with different names, postman only takes the first name. In above example, postman only reads data called “scenario”.

I would suggest to in data json file array to use your scenario1 and event1 in first object and scenario2 and event2 in second object and so on like following:

[
{
“scenario”: “scenario1”,
“event”: “event1”
},
{
“scenario”: “scenario2”
“event”: “event2”
},
{
“scenario”: “scenarioN”
“event”: “eventN”
}
]