-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
enhancementNew feature or requestNew feature or request
Description
It would be very helpful to be able to store specific portions of web responses in order to use in subsequent requests. For example
- Send request to serviceX/api/v1/getUserByName?name=sampacos
- serviceX responds with json such as
{
"userId": "1245235",
"name": "sampacos",
"age": "45",
"userPreferences": {
"autoSave": "true"
"sessionId": "12344123123"
}
}
- Send request to serviceY/api/v1/getProjectsByUserId?userId=1245235&sessionId=12344123123
What we need is the ability to store values from specific fields in the json to use for later requests.
In Gherkin, this might look something like this:
Given I use the API named ServiceX
When I add a parameter name with value sampacos
And I send a GET request to the api/v1/getUserByName endpoint
Then I verify the response code is 200
And I note the userId in the response
And I note the userPreferences.sessionId in the response
When I use the API named ServiceY
When I add a parameter userId with the noted value
And I add a parameter sessionId with the noted value
And I send a GET request to the api/v1/getProjectsByUserId endpoint
Then I verify the response code is 200
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request