Open nap-sam-dean opened 7 years ago
@nap-sam-dean Do you mean the Gherkin feature files are converted to Swift style gherkin files, or do you mean to generate StepDefiner subclasses with template step definitions? Just to be sure I understand what you exactly want to achieve here. Some thoughts:
It would be good to keep the .feature files. We want to version them:
Imagine there is a new version of gherkin tests - eg. new scenario in a .feature file - than the tests run and they fail. This alarms the developer and he needs to implement the new scenario. This would prevent updating the .feature file without noticing. At least I hope :)
On my current project, we are not using feature files but that's something I'm actively looking into
For templating purposes, we can use Stencil. I already have a WIP implementation, but it depends on a few other changes that should go in first (i.e. #119)
This can improve a lot the workflow when using feature files as we could use the same command line tool to invoke xcodebuild
with -only-testing
option to run a single test, i.e. using VSCode test task (which is good for writing feature files because it has plugin for autocompletion). I didn't check but I suppose with tests added at runtime it does not work, at least on the first run.
This can also help teams who want to migrate from feature files to do it just with on command.
A script which would run over a feature file and create a stubbed XCTestCase implementation in swift.