简体   繁体   中英

Test Framework - Cucumber with JSON instead of Gherkin Feature file

I have a Test Automation Framework project where I have to use a JSON file instead of a Gherkin Feature file integrated with Cucumber and Java. Instead of reading from feature file, Cucumber should read test cases from JSON. I am doing some research for the best possible approach in this scenario. Please share any experience, thoughts or peace of information.

What about this?

{
   "Scenario": "Use Json in Cucumber",  
   "Tags": [ "@json", "@cucumber", "@alternative" ], 
   "Data": 
        {
          "Given": "Something exists or is",
          "When": "Something happens",
          "Then": "Something changed"
        } 
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM