-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use official parser #378
Comments
As far as I know, @olegpidsadnyi started some work on this (or at least planned to) - see e.g. #366 (comment) |
@The-Compiler @olegpidsadnyi Do you have any idea when will be the next release of Pytest-bdd? I was asked twice already from company guild meeting about this. Very much looking forward to it. 😄 |
I actually abandoned the idea (for the moment) of using the parser from cucumber. I am trying instead to rewrite the parser. |
@youtux could you please provide some insights into why rewriting was selected over using the official parser? Maybe it's possible to create some intermediate adapter layer(or model) to make possible support a few different parsers?
|
It looks like this has become the blocker for Datatables, i.e. #366 (comment), but the rewrite-parser branch also stalled in September 2020, over twelve months ago. Is there still seen to be a way forward in this direction (replacing the parser, either a rewrite or integrating the Gherkin python parser), or do we need to resuscitate #366 against current pytest-bdd master in order to advance that support? (Or perhaps point people at external addons like sttable although I don't know how well-maintained that is, as I haven't actually tried it.) |
I dont mind about the parser but i want pretty data tables in my CI reports :) . We use sttable as a workaround and it works perfectly except its not supported by CI reporting tools. Recommend sttable is officially incorporated into pytest-bdd as a quick win so downsteam tools can also be updated. Its really nothing more than a standard Python dict and list parsing so should be fairly maintenance free. |
For those interested, lately I've been working on a new parser in the branch https://github.com/pytest-dev/pytest-bdd/tree/tatsu-parser. It is almost complete, it needs polishing around error reporting and documenting the changes. |
I have integrated the official parser into pytest bdd, it still needs some polishing, but it gives a possibility to integrate with tools from cucumber.io |
Any plans to support Markdown with Gherkin ? |
@elchupanebrej Any plans to reintegrate the work you did in pytest-bdd-ng into pytest-bdd ? |
To be clear, @elchupanebrej is not part of the pytest-bdd team. So no, there is no plan to integrate the changes of pytest-bdd-ng into pytest-bdd. |
Since the pytest-bdd-ng work is not being considered, how's progress on the local attempts? |
I haven't had any time in the last period to work on this unfortunately. |
Hi @youtux , et al. TL;DR: A path toward full cucumber supportI contribute to the upstream open-cucumber project and I'm one of the few pythonistas there. Since Pytest-BDD has drifted behind Cucumber core and the cucumber team doesn't build a python implementation, there are several components (like the message parser and the cucumber expressions) which require a big lift to reproduce in the current state of pytest-bdd. Bad news:The current "macro-economic conditions" have reduced the number of resources in the open cucumber team. We don't anticipate being able to produce a python implementation. We would like to contribute to pytest-bdd and have that be the reference cucumber implementation. (We already spoke to Jens and he decided that behave is not a suitable candidate. When I spoke with @elchupanebrej a few months ago, he said he was not able to determine how to contribute to Good newsSome of us want to improve the python support I have several people interested in refactoring Pytest-BDD so that it is in sync with upstream. In fact, I can get assistance from the upstream team with acceptance testing. Next StepsIdeally, we would like to learn how to contribute to see also: |
@elchupanebrej has already added the official Cucumber Gherkin parser in his fork of Pytest-BDD; it already supports data tables, multiple Examples tables, 'Rule'... You can see a comparison in the tutorial: https://thebddcoach.com/post/a-quick-introduction-to-pytest-bdd-ng-for-people-who-are-already-familiar-with-cucumber-or-behave/ If we can merge the two projects it would be a big win for everyone. |
Hi @blaisep, I talked also to @olegpidsadnyi and this sounds like a great opportunity to join effort and improve pytest-bdd to get all the features of cucumber and become the reference implementation for python! I started some time ago rewriting the parser in order to enable all the "new" features (datatables, i18n support, ...), but unfortunately I never had enough time to complete it. At the time, I didn't want to rely on the But if we could have the support of the cucumber team and make sure that our requirements and specs are aligned, then I'm all up to use the official parser library! That being said, I don't have too much time currently to work on integrating the parser, but if you or anybody would like to work on it, I'll be glad to give directions and review code to get it merged in pytest-bdd. How does that sound? |
@youtux, @elchupanebrej has already integrated the official parser into Pytest-BDD-NG, so it shouldn't be difficult to merge those changes into Pytest-BDD. |
Is there an interest in switching to the official Gherkin parser: https://github.com/cucumber/cucumber/tree/master/gherkin/python?
I would be willing to prepare a PR.
Cheers!
The text was updated successfully, but these errors were encountered: