Natural icon indicating copy to clipboard operation
Natural copied to clipboard

Add Support for Cucumber Expressions

Open drkstr101 opened this issue 4 years ago • 2 comments

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.

drkstr101 avatar Sep 09 '20 22:09 drkstr101

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)

rlogiacco avatar Sep 10 '20 09:09 rlogiacco

Yes I think you are right. It would be ideal if step matching was consistent with underlying library used to execute the tests.

drkstr101 avatar Sep 11 '20 01:09 drkstr101