cucumber / gherkin-utils

API for working with Gherkin documents
MIT License
9 stars 4 forks source link

Generate a feature file from a parsed document #3

Open pligor opened 1 year ago

pligor commented 1 year ago

🤔 What's the problem you're trying to solve?

As one has the Parser like here:

parser = Parser()
gherkin_document = parser.parse("Feature: ...")

and has changed/updated a few elements of the gherkin_document (which is really just a dictionary in Python) Isn't it logical for many instances to want to re-generate the feature file ?

✨ What's your proposed solution?

A script which extracts the information from within the Parsed Gherkin document and generates a valid .feature file with this feature

⛏ Have you considered any alternatives or workarounds?

If there is not none already the only way to go is to build one myself but for this community it would be a more mature solution if you could integrate it in this repo

📚 Any additional context?


This text was originally generated from a template, then edited by hand. You can modify the template here.

mpkorstanje commented 1 year ago

I believe that we already have some of this functionality for Java and Javascript. It doesn't exist (yet) for Python.

I reckon a pull requests would be welcome.

https://github.com/cucumber/common/tree/main/gherkin-utils#prettygherkindocument-messagesgherkindocument-syntax-gherkin--markdown