Skip to content
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

Adding kind of an Example table in the Background steps #226

Closed
NiPelissier opened this issue Feb 6, 2024 · 1 comment
Closed

Adding kind of an Example table in the Background steps #226

NiPelissier opened this issue Feb 6, 2024 · 1 comment

Comments

@NiPelissier
Copy link

NiPelissier commented Feb 6, 2024

🤔 What's the problem you're trying to solve?

As far as I know, it is not possible to use examples tables in background step. This feature could allow to run multiple times scenario of a feature with differents given steps.

It could be nice to be able to do something like this:

Feature: aFeature
Background
Given user1 is

    Examples
        |           aParam               |
        | connectedWithFirefow |
        |   connectedWithEdge  |

✨ What's your proposed solution?

⛏ Have you considered any alternatives or workarounds?

📚 Any additional context?


This text was originally generated from a template, then edited by hand. You can modify the template here.

@NiPelissier NiPelissier changed the title Hello community, Adding kind of an Example table in the Background steps Feb 6, 2024
@mpkorstanje
Copy link
Contributor

To help us understand this feature request a bit better, what is the underlying problemen you are trying to solve? Do you have a more comprehensive example?

Historically speaking, the general consensus has been that programming features don't belong in Gherkin. As they make the scenario much harder to understand for non-technical users.

It would for example be difficult to determine just by reading which examples are used where. Especially when an example table is used in the background in combination with with a scenario outline.

As a workaround, what usually does work is to create a list of things (e.g. users) using a data table in the given step of the background. All scenarios then use all these users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants