Natural
Natural copied to clipboard
Add Support for Cucumber Expressions
Support for Cucumber Expressions has been added to recent versions of cucumber-jvm, which cause the stepmatcher to fail in the current release. It took those folks a little over a year to implement the feature, so it seems like it will be quite involved.
This work should most likely happen as a separate point release after next, which addresses the immediate issue of the validation routine bailing with a runtime exception. This is accomplished by ~~checking the first character of the annotationValue
prior to attempting the regex match~~ catching any PatternSyntaxException that results from the match and defaulting to false (no match found). The next step would be to attempt to parse the annotationValue
as a Cucumber Expression to see if it matches the provided step description.
We should consider integrating with the internal parser/matcher instead of using our own:
- it's hard to create an EBNF version of the Gherkin syntax (as you have experienced first-hand)
- it's tough to follow the Gherkin and Cucumber development rate (it's just the 2 of us)
Yes I think you are right. It would be ideal if step matching was consistent with underlying library used to execute the tests.