-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Pass a parameter to stage #776
Comments
Could you make this work with parameterized fixtures? |
As far as I know, I can't pass parameters, which I receive in the middle of the test, to the fixture. Of course, I can pass the whole flow to the fixture, write the functions with the parameters I need, and reuse them from this fixture. Or copy-paste as many stages as is needed (like in the example above |
If you're implying you want to be able to dynamically create stages from parametrised input, that isn't really likely to ever happen because there are a few places where Tavern depends on knowing what is on the source line of the stage. Personal opinion, but it also makes it a bit confusing where each stage could be expanded to multiple stages depending on user input, so what you're seeing in the file isn't showing the full picture of what stages would actually be run |
It would be cool to have an opportunity to pass a parameter to the stage. It's possible to do this via parametrize mark, however, there can be cases when we want to pass the parameter we received and saved during previous stages.
I.e. we create two entities (in different ways / with different test data and in different stages) and then we want to delete them and pass the ID of each entity to the delete-stage. In order to do that we should write two very similar stages instead of one and passing
first_entity_id
/second_entity_id
to there.Maybe, there is some way to do that?
If not, it would be a nice enhancement.
The text was updated successfully, but these errors were encountered: