We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The status code is less than 400, but it is Failed. Run the same scenario with HttpUser, 304 will not be treated as an error.
$ locust -f test.py --headless -u 1 -r 1 --run-time 1s ... Error report # occurrences Error ------------------|------------------------------------------------------------------------------------------------------------------------------------------- 18 GET /en/stable/_static/css/theme.css: BadStatusCode('https://docs.locust.io/en/stable/_static/css/theme.css', code=304) ------------------|-------------------------------------------------------------------------------------------------------------------------------------------
locust -f test.py --headless -u 1 -r 1 --run-time 1s
from locust import FastHttpUser, task class SampleScenario(FastHttpUser): host = "https://docs.locust.io" default_headers = { "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "ja", "Connection": "keep-alive", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0", "sec-ch-ua": '"Microsoft Edge";v="119", "Chromium";v="119", "Not?A_Brand";v="24"', "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": '"Windows"', } @task def task_01(self): with self.client.get( url="/en/stable/_static/css/theme.css", headers={ "Accept": "text/css,*/*;q=0.1", "If-Modified-Since": "Thu, 05 Oct 2023 21:35:33 GMT", "If-None-Match": 'W/"f14328d9217f8a6517a2c91eaca7764a"', "Referer": "https://docs.locust.io/en/stable/quickstart.html", "Sec-Fetch-Dest": "style", "Sec-Fetch-Mode": "no-cors", "Sec-Fetch-Site": "same-origin", }, catch_response=True, ) as resp: pass
3.9.18
2.19.1
Rocky Linux 9
The text was updated successfully, but these errors were encountered:
FastHttpUser: Treat response code 305 as OK. Fixes #2500
dfe9cd3
Successfully merging a pull request may close this issue.
Prerequisites
Description
The status code is less than 400, but it is Failed.
Run the same scenario with HttpUser, 304 will not be treated as an error.
Command line
locust -f test.py --headless -u 1 -r 1 --run-time 1s
Locustfile contents
Python version
3.9.18
Locust version
2.19.1
Operating system
Rocky Linux 9
The text was updated successfully, but these errors were encountered: