You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using your tool to test a rest API and needs to pass variable from one scenario to another.
In the first one I do a POST request to create an item and in second scenario later on I try to delete the created item.
For that I use you grab fuction in the first scenarion and try to use it in the second but does not seem to work. It seems the scope of a variable is a scenario. Do you have a work around to pass variables ?
I tried to group everything into one scenario but got errors message on headers.
doing the same request on a different scenario work. The headers are declare by:
Given I send "x-www-form-urlencoded" and accept JSON
And I add Headers:
| Cache-Control | no-cache |
|authorization | Basic XXXXXXXXX |
Thanks for your help
The text was updated successfully, but these errors were encountered:
If you do more than one HTTP request in a scenario, any headers you set on the first request are not inherited in subsequent requests. This is why you are getting a 401 when you make the DELETE request. You need to set the Authorization header again.
I will do it that way I guess. It would be great if could use the background steps information in any request we do later on. Right now we can only use it for the first request of a scenario which is really great by the way.
Thanks for your help, I like you tool, makes life easier :)
HI,
I am using your tool to test a rest API and needs to pass variable from one scenario to another.
In the first one I do a POST request to create an item and in second scenario later on I try to delete the created item.
For that I use you grab fuction in the first scenarion and try to use it in the second but does not seem to work. It seems the scope of a variable is a scenario. Do you have a work around to pass variables ?
I tried to group everything into one scenario but got errors message on headers.
And I send a POST request to "http://192.168.99.100:5252/data/application"
Then the response status should be "200"
And I grab "$.application.id" as "id"
Then I send a DELETE request to "http://192.168.99.100:5252/data/application/{id}"
doing the same request on a different scenario work. The headers are declare by:
Given I send "x-www-form-urlencoded" and accept JSON
And I add Headers:
| Cache-Control | no-cache |
|authorization | Basic XXXXXXXXX |
Thanks for your help
The text was updated successfully, but these errors were encountered: