I'd like to perform my tests using Cucumber + Excel to store my data. I don't want to keep my data stored on the procedure files. Is there a way to do this?
1 Answers
Yes, this is possible.
What you need to do is to implement reading the data in your step implementations.
If you are using the data from Excel to setup the system under test, then read in the steps that prepare the system.
If you are using steps for verifying the outcome, then read the Excel files in the steps you execute from your then steps.
There, at least, is one possible issue with doing it like this. It may not be easy to validate your scenarios by reading the feature file since the scenarios depend on data that may be hard to read at the same time. So while it may seem like a great idea to combine cucumber and Excel, it may not be so great.
Cucumber is a tool for automating BDD. At the core of BDD is communication between devs, tester and business people. The feature files are used for communication by describing, easy to understand and agree upon, examples. These examples might be obfuscated using the Cucumber + Excel approach.
This is a route I personally would avoid.

- 4,098
- 3
- 18
- 25