Issues with stateful testing, OpenAPI links #2054
Unanswered
sherkhan91
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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