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
Scenario Outline with multiple examples dosent work #1082
Comments
What's the benefit in separating examples into separate tables? Would the
reporting show them as groups?
…On 25 September 2017 at 11:50, Mohamed Cherif Bouchelaghem < ***@***.***> wrote:
I want to use Scenario Outline with multiple example table but it runs the
last examples table only, here is an example
Feature: testing scenarios with multiple examples section
Scenario Outline: outline
When a table step: | first | second | | <first> | <second> |
Examples: First set of examples | first | second | | 1 | 2 |
Examples: Second set of examples | first | second | | 3 | 4 | | 5 | 6 |
this example is taken from cucumber issue cucumber/cucumber-js#217
<cucumber/cucumber-js#217> where is had the
same issue and it was considered as a bug.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1082>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA6ZgHCsa5HJ8ImeBstYCde4JuINDWp2ks5sl4WIgaJpZM4Piiqj>
.
--
__________
*Jon Acker*
Trainer
*INVIQA*
*Business first*
*T:* +44 (0)203 1799 555
*M:* +44 (0)796 334 6071
*W: inviqa.com <https://inviqa.com> *
*Disclaimer:*This email and any attachments may be confidential and are
intended solely for the use of the addressee. Any views or opinions
expressed are those of the author and may not represent those of Inviqa. If
you are not the intended recipient of this email, you must neither take any
action based upon its contents, nor copy or show it to anyone. Please
contact the sender if you believe you have received this email in error.
|
I have multiple scenarios to check and they share contexts/actions the examples above dosent demonstrate the benefit, for example I design a cms so I want to check when I define a new content types which dont exist (valid scenario) and the second examples to define content types which already exists (invalid scenario), they can be in the same table (examples) but I consider this multiple scenarios in one. |
Even though "Examples" and "Scenarios" are terms that are often used in
interchangeably, Examples in Gherkin != Scenarios. Examples in Gherkin are
a data-table for a Scenario Outline.
I'm not saying that there's no case for having multiple example tables per
scenario, but in your case it sounds like you have two separate scenarios.
One in which the types exist, and one in which they don't.
…On 25 September 2017 at 12:13, Mohamed Cherif Bouchelaghem < ***@***.***> wrote:
I have multiple scenarios to check and the share contexts/actions the
examples above dosent demonstrate the benefit, for example I design a cms
so I want to check when I define a new content types which dont exist
(valid scenario) and the second examples to define content types which
already exists (invalid scenario), they can be in the same table (examples)
but I consider this multiple scenarios in one.
Examples are Scenarios, right?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1082 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA6ZgCg18-IHg5yBOrFwCTpFcwvs_e2cks5sl4rTgaJpZM4Piiqj>
.
--
__________
*Jon Acker*
Trainer
*INVIQA*
*Business first*
*T:* +44 (0)203 1799 555
*M:* +44 (0)796 334 6071
*W: inviqa.com <https://inviqa.com> *
*Disclaimer:*This email and any attachments may be confidential and are
intended solely for the use of the addressee. Any views or opinions
expressed are those of the author and may not represent those of Inviqa. If
you are not the intended recipient of this email, you must neither take any
action based upon its contents, nor copy or show it to anyone. Please
contact the sender if you believe you have received this email in error.
|
@jon-acker After the issue submission I refactored the scenarios to be like you said, thank you :) |
For readers of a scenario outline there is a case for being able to make multiple example tables. Then you can head them up with descriptions of their purpose, e.g.
that makes it easier for others to understand the purpose of subsets of examples. And if/when it becomes supported to tag scenario outline examples, you could also be able to tag each examples table. That way, there is the potential to run different combinations of example tables on a test run. e.g. have examples tables of "a few typical valid inputs" and "a few typical invalid inputs" and tag those "smoketest". Then you can run |
For the record, the current behavior is that the last examples table is run, e.g.:
runs 2 scenarios for the 2 file names in the last examples table. |
I fixed it in fork danchukas/Behat. |
This might have a deep-cutting implications on formatters, so I'd look into this one for next major. |
@everzet Thank you! |
Any update as to when this will be part of the next behat release? |
I would love to see this feature introduced so just linking the related Gherkin issue and MR here so it easier to find it. |
I want to use Scenario Outline with multiple examples table but it runs the last examples table only, here is an example
this example is taken from cucumber issue cucumber/cucumber-js#217 where it had the same issue and it was considered as a bug.
The text was updated successfully, but these errors were encountered: