autostep / AutoStep

AutoStep Testing Framework - Core Libraries and Components
MIT License
22 stars 1 forks source link

Step doesn't bind if quotes are used around parameters in step definition #31

Closed McCraigJ closed 4 years ago

McCraigJ commented 4 years ago

If I create a step definition that has quotes around parameters, then the step doesn't bind. E.g. Step Definition

Step: Given I have logged in to my app as '{username}', password '{pwd}'

Usage

Given I have logged in to my app as 'USER', password 'PWD'

Result The Given in the usage shows a linker error

alistairjevans commented 4 years ago

The reason it doesn't parse is that because the opening quote has already been consumed as part of a Word, the end quote is considered part of the argument, so the following quote in the original step definition doesn't match.

The best way to resolve this is to indicate that the step definition is not good (because you don't need quotes round the argument, and it looks weird). The fix will be to raise an error on the definition.