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 have also looked up the discussion regarding stateful testing here, #1212
What I expected:
I expected schemathesis to do the POST /profile operation and pick the #id attribute from response and fill that in for GET /profile/{id} rest call.
What I got:
Now the problem it does not pick the link from POST method, it just tries to call it individually. It just ignores the response from POST /profile operation and performs the GET /profile/{id} operation using a random value for {id}.
My questions:
What am I missing here to link the GET profile/{id} endpoint to connect with the POST /profile operation?
After fixing 1): Could we also use these links for automated testing of DELETE operations, where the DELETE operation would be /profile/{id} ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
As we are using schemathesis for testing our API’s, we want to utilize it for stateful testing, hence we defined the links in our OpenAPI as follows:
Endpoint which will use link:
The linked endpoint:
I have followed the example from:
https://schemathesis.readthedocs.io/en/stable/stateful.html#how-to-specify-connections
and
https://swagger.io/docs/specification/links/
I call it in following way:
AND
following way:
I have also looked up the discussion regarding stateful testing here,
#1212
What I expected:
I expected schemathesis to do the
POST /profile
operation and pick the #id attribute from response and fill that in forGET /profile/{id}
rest call.What I got:
Now the problem it does not pick the link from POST method, it just tries to call it individually. It just ignores the response from
POST /profile
operation and performs theGET /profile/{id}
operation using a random value for {id}.My questions:
/profile/{id}
?Environment information:
Python version: 3.9
Operating System: Mac OS Monterey 12.0.1
Django version: 4.1.1
Rest framework version: 3.14.0
Schemathesis version: 3.23.0
Beta Was this translation helpful? Give feedback.
All reactions