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.
- id: create_first_entity
...
save:
json:
first_entity_id: id
- id: create_second_entity
...
save:
json:
second_entity_id: id
- id: delete_first_entity
name: delete the first smth
request:
url: "{tavern.env_vars.API_URL}/v1/admin/smth/{first_entity_id}"
method: DELETE
headers: *headers
response:
status_code: 204
- id: delete_second_entity
name: delete the second smth
request:
url: "{tavern.env_vars.API_URL}/v1/admin/smth/{second_entity_id}"
method: DELETE
headers: *headers
response:
status_code: 204
Maybe, there is some way to do that?
If not, it would be a nice enhancement.
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_idto there.Maybe, there is some way to do that?
If not, it would be a nice enhancement.