From 67ec348303bf07082b992154ff7d254f66d256ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=B0=AC=ED=98=B8?= Date: Thu, 16 Dec 2021 09:38:15 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=B2=AB=20=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=EC=97=90=20=EB=8C=80=ED=95=9C=20=EC=8A=A4=ED=8A=B8=EB=A0=88?= =?UTF-8?q?=EC=8A=A4=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locustfile.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 locustfile.py diff --git a/locustfile.py b/locustfile.py new file mode 100644 index 00000000..7a8eca29 --- /dev/null +++ b/locustfile.py @@ -0,0 +1,22 @@ +import time +from locust import HttpUser, task +from locust.user.wait_time import between + +class LogInUser(HttpUser): + wait_time = between(1, 4) + def on_start(self): + response = self.client.post('/api/users/login', json={'email':'test1@gmail.com', 'password': 'token'}) + cookie = response.cookies + self.client.cookies = cookie + @task + def use_task(self): + self.client.get('/api/users/tasks?userId=1&offset=0') + self.client.get('/api/users/tasks?userId=1&offset=10') + self.client.get('/api/users/tasks?userId=1&offset=20') + self.client.get('/api/users/tasks?userId=1&offset=30') + self.client.get('/api/users/tasks?userId=1&offset=40') + self.client.get('/api/users/tasks?userId=1&offset=50') + self.client.get('/api/users/tasks?userId=1&offset=60') + self.client.get('/api/users/tasks?userId=1&offset=70') + self.client.get('/api/users/organization?organizationId=1') + self.client.get('/api/users/?email=') \ No newline at end of file