rlogiacco / Natural

Natural is a collection of Eclipse plugins to enable rich smart editing of acceptance tests using natural language definition files. It currently supports Cucumber and JBehave syntax.
Eclipse Public License 1.0
75 stars 37 forks source link

Add Support for Cucumber Expressions #89

Open drkstr101 opened 4 years ago

drkstr101 commented 4 years ago

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.

rlogiacco commented 4 years ago

We should consider integrating with the internal parser/matcher instead of using our own:

drkstr101 commented 4 years ago

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