Add support for Cucumber Expressions
See original GitHub issueSummary
Cucumber Expressions is a new alternative to Regular Expressions, which is easier to read and write, and less daunting.
Expected Behavior
Step Defintions that don’t start with a ^
or end with a $
should be interpreted as a Cucumber Expression:
@Given("I have {n} cukes in my belly")
Alternatively we can decide to use regular expressions if the string uses /
delimiters:
@Given("/I have (\\d+) cukes in my belly/")
Whatever mechanism we choose to differentiate is likely to break existing step definitions, so we’d have to make a new major release and document how to migrate.
Snippets for undefined steps should use Cucumber Expressions, and not Regular Expressions. We want users to start migrating, and if we can avoid it we’ll not generate snippets with regular expressions. (Well, we might if enough people want it). The cucumber-expression
library can already generate expressions from text.
Finally, the current Transform
logic should be deprecated and the logic built into the cucumber-expression
library should be used instead.
Context & Motivation
Having to use Regular Expressions is one of the most common complaints against Cucumber. Other clones of Cucumber who support something similar to Cucumber Expressions seem to have happier users!
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (7 by maintainers)
Top GitHub Comments
Thanks for waiting!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.