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
Background Outline #567
Comments
@jsliacan MUCH SIMPLER SOLUTION:
|
I believe this is a limitation of cucumber in general and not just Godog. Looking at the cucumber documentation it seems like this is not possible https://cucumber.io/docs/gherkin/reference/#background. I do agree however this would be a nice feature to have. |
🤔 What's the problem you're trying to solve?
I want to avoid multiplicating Feature files (aggregations of Scenarios) that need to be run under different
Background
conditions.Imagine you have
n
Scenarios about how a user interacts with a running cluster. In a Background, you set up and start the cluster 1x (condition checks if it's already running, if it is, nothing happens) - this saves loads of time by not starting the cluster for each Scenario.What I need to do is test all these Scenarios on a cluster that runs behind a proxy, offline, online in the open, some other corporate environment, etc. Note: it is not possible to change the defining settings of the cluster after it's started. In short, I need a way to run all Scenarios in the Feature file multiple times over against a different background, and I want this to be explicit to the user who reads the Feature file (not done behind the scenes quietly).
Something like the following Feature file needs to run in different environments:
✨ What's your proposed solution?
Parametrized
Background
(such that parametrization is controlled from the .feature file) seems like a feature that would find its use. Not sure what the complications might be if this was to be taken seriously...⛏ Have you considered any alternatives or workarounds?
The following two options come to mind right away (and I'll probably use the 2nd one in the meantime anyways):
Background
I saw a similar question on StackOverflow from 3y ago but didn't find an issue about it over here.
Thanks for any tips (if I'm overlooking existing solutions!) and your time in general!
The text was updated successfully, but these errors were encountered: