-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not recognizing step definition in Scenario Outline #40
Comments
Nice spotted! I believe it has to do with the way step to stepdefs matching is executed. |
Duplicate of #31 |
Flagging for review in next. |
This issue has not been updated for a while: marking it as stale. |
Hmm, this could be tricky. We may have to pull values from the parsed Table data to know how to match the tokens in the step definition. |
I believe we have also a visualization problem: what should we do when the first three rows match but the fourth doesn't? How to pinpoint where the problem is? Not to mention the performance degradation... We can aim at a compromise: replace any reference to the placeholders in the step with a fixed value, let's say an underscore, then the step defs must be altered to include this marker char, like |
What if we maintain a cache of Of course there would need to be a bit of work done at the grammer level, and, for example, providing an |
When such entries are evicted from this cache and how do you identify which entries should be removed? You need to also store the source file and evict all entries in the file whenever that file is saved and rebuild that part of the cache... Then your stepmatcher must inspect the cache using the current file as an index.... The step matching is not blazing fast and it is doing at most one match per step, with this approach a table with 100 examples will produce match attempts x 100 |
Ah yes good point, I can see how this could get unwieldy. |
What if we simply parse the first row (after the header), then make it clear in the warning message what description was used to validate the step definition. Then we can move the step validation check up to IMHO this would be more user friendly than requiring changes to the step definitions to compensate for the editor. |
Yes, I agree with your suggestion: we only try to match the first row of the first table (multiple examples at play!) and CTRL+click brings you to the stepdef we used for matching. This is a much better compromise than what I was suggesting. 👍 |
While natural seems to do a great job with the step definition in the flows (seen above in pic), in the scenario outline, it doesn't seem to find the regex. Is it confused by the placeholders not being digits?
The text was updated successfully, but these errors were encountered: