Gherkin Scenario Outline style syntax?

Hi, thanks for this great tool. I’m new to BDD, and testing in general, and have been reading Smart’s “BDD In Action”. He describes using Gherkin Scenario Outline syntax like this (from page 127):

Scenario Outline: Earning points on flights by Frequent Flyer status
Given I am a Frequent Flyer member
When I fly on a flight that is worth base points
Then I should earn a status bonus of
And I should have guaranteed minimum earned points of
And I should earn points in all

status | base | bonus | minimum | total |

Standard | 139 | 74 | 0 | 439 |
Silver | 148 | 74 | 500 | 500 |
Silver | 439 | 220 | 500 | 659 |
… etc,

So obviously, from this, all scenarios in the Examples table run.

Is this syntax supported? Right now, all I see is that one can pass the data element into the “then” function and use that for multiple tests. However, running any scenarios where are defined results in blank values for the variables, and I don’t see how to make this work.


As a quick answer, the BDD functionality for Gherkin support is pretty new. It appears that it only supported Given-Then, rather than Given-When-Then. So I doubt the functionality you’re asking about is supported yet. However, it is an opportunity to fork the repo and add it, if you need it. It has been on my todo list for quite awhile, but I haven’t gotten to it yet. hth

Full Gherkins support is in the works. You can find the first iteration and contribution on this here:

We would love to make an official package built in, but it needs more testing.