how to setup json as data provider in to cucumber steps. using cucumber java

Viewed 37

I want to match json data based on scenario name. i.e using scenario name particular json node need to be selected. any can one help on how can i setup this approach. i am using Cucumber with Java.

Json will look like this. { "scenario1": { "coffeestore": "CCD", "Area": "Hyderabad" }, "scenario2": { "coffeestore": "starbucks", "Area: "Banglore" } }

Feature will look like this. Scenario: senario1 Given user enters coffeshop details And user saved the coffeshop details

Scenario: senario2 Given user enters coffeshop details And user saved the coffeshop details

0 Answers
Related