简体   繁体   中英

One cucumber data table for multiple feature file/scenarios

I have a scenario where multiple feature files are using a similar set of data so I want to have one data table within the framework and refer it in multiple feature files/scenarios

Example: Suppose i have 2 feature files feature1 and feature2 both expecting signing data as test data. currently what i am doing is writing signing details in both feature files but I want common data table in one place. Is it possible in the cucumber framework?

Data tables are typically associated strictly with a single Scenario (or Scenario Outline ), so sharing across feature files is not possible. While it may seem annoying to have to replicate the data, it aids in keeping processing of the feature file simple, and aids in reading the content off as a human reader.

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