Skip to content
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

Add support of cucumber expressions #566

Open
elchupanebrej opened this issue Oct 16, 2022 · 2 comments
Open

Add support of cucumber expressions #566

elchupanebrej opened this issue Oct 16, 2022 · 2 comments
Labels
blocked Currently blocked by a dependency from being developed/fixed feature

Comments

@elchupanebrej
Copy link

Cucumber expressions module is a part of the Gherkin toolset. To make pytest-bdd compatible with official tools it has to support cucumber expressions

https://github.com/cucumber/cucumber-expressions#readme
There is the official implementation for python: https://pypi.org/project/cucumber-expressions/

An example implementation can be found here elchupanebrej#76

@jsa34
Copy link
Collaborator

jsa34 commented Nov 14, 2024

This is currently blocked until such time as either named parameters can be returned by Cucumber Expressions, or a suitable solution that adheres to the current syntax expected for pytest-bdd to handle that Cucumber Expressions are positional only at present

@jsa34 jsa34 added blocked Currently blocked by a dependency from being developed/fixed feature labels Nov 28, 2024
@neskk
Copy link

neskk commented Jan 30, 2025

@jsa34 I think this should be prioritized.
Cucumber-expressions could work if pytest-bdd does the matching of arguments work by cardinality.
If a parameter name does not match any fixture, it must be coming from the expression.
Using pytest-bdd parsers causes cucumber-language plugins to stop working and won't recognize the step-definitions nor its arguments.
I managed to have a tree-sitter syntax that matches the syntax with "parsers.parse()" but then it fails completely due to confusing the named parameters with parameter types - it looks at {endpoint}, and assumes endpoint is a custom parameter type.

Update: I see that you're working on adding support for named groups in cucumber expressions. I'm not sure it will fix the autocomplete plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Currently blocked by a dependency from being developed/fixed feature
Projects
None yet
Development

No branches or pull requests

3 participants