-
Notifications
You must be signed in to change notification settings - Fork 71
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
Support for example values - or better examples #64
Comments
Hey, thanks for the feedback! Documentation does need to improve. I'm a little busy right now so I can't help right away. I'll consider your suggestion of syntax as well and get back to you. 🙂 |
Hi, I would expect examples to be handled using regex steps. And during the execution the example values can be automatically inserted, and the Scenarios be executed one for each example. With the example given in test.features the scenario
could be implemented as:
And would generate a result like:
I created a small example for that in this branch |
@stefanpieck looks neat. 😄 I had come to the conclusion to do it the same way, though hadn't found the time. Instead, I had focused on splitting "Scenario" into an enum of "Scenario Outline" and "Example", as per the Cucumber reference. I'd be happy to accept your implementation here via a PR, and then add my stuff on top later. |
The first half of this has been merged now. I'll work on the splitting of scenario into two items when I have time. 😄 |
What does it take to get the second half done as well? |
It doesn't seem that you need the second half to achieve what you want. Change your cucumber dependency to point to:
and see if it behaves how you would expect. 😄 |
@bbqsrc Doing so does not seem to change the problem at all 🤔, even though it seems to build of the newest commit: Cargo.lock snippet: [[package]]
name = "cucumber_rust"
version = "0.7.3"
source = "git+https://github.com/bbqsrc/cucumber-rust?branch=main#7140ba0d7314cd8863d7c290e8e31c2aa0b4cc59"
dependencies = [
"async-stream",
"async-trait",
"clap",
"cute_custom_default",
"futures",
"futures-timer",
"gherkin_rust",
"globwalk",
"pathdiff",
"regex",
"shh",
"termcolor",
"textwrap 0.12.1",
"thiserror",
] |
As per #64 (comment), to match the step you'll need to use regular expressions for the replacement positions for now. |
That is what I'm doing. I'm not able to spot what I'm doing wrong, please have a careful look at #86 again. AFAICT I'm doing the equivalent to the comment you linked, still with |
@tyranron I'll dedicate separate chapter with concrete examples of usage |
Described in "Features" chapter fo the Book. |
I expected to access the values in example table easier, like scenario outline can be execute for each row of the example table and in those scenarios we can access the values easier, like:
Or do we need to collect all examples in the World, but how? The example test is not implement for that.
The text was updated successfully, but these errors were encountered: