Locust client does not send cookies automatically ? #3042
Unanswered
tomohirohiratsuka
asked this question in
Q&A
Replies: 1 comment 1 reply
-
No, it should work out of the box. The most likely explanation is that the client (a Maybe try printing the http conversation https://docs.locust.io/en/stable/running-in-debugger.html#print-http-communication You could also try using FastHttpUser. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Overview
We are encountering an issue where, after a successful login, the cookies that are set during the login process are not automatically included in subsequent requests using
self.client.get()
. This is observed when usingLocust
for load testing.Problem Description
access_token
andrefresh_token
set in the cookies, these cookies should be automatically included in the subsequent requests.self.client.get()
. Cookies need to be manually passed via thecookies
parameter for subsequent requests to include them.Steps to Reproduce
The following code demonstrates the issue. After the login, the cookies should be automatically included in the next requests, but they are not.
Observed Issue:
self.client.cookies
.GET
request to/api/auth/me
, the cookies are not automatically included.Expected Behavior:
access_token
andrefresh_token
) should be automatically sent with theGET
request to/api/auth/me
.Questions to Address
Is this the expected behavior for
Locust
?How can we ensure that cookies are automatically included in subsequent requests without manually passing the
cookies
parameter?Locust
that need to be adjusted for this?Thank you
Beta Was this translation helpful? Give feedback.
All reactions