Skip to content

passing variable between scenarios #29

Description

@jagarcad

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}"

<title>Error 401</title>

Unauthorized (401)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions