pip install locust # locust 설치
locust -v # 설치 확인
from locust import HttpUser, TaskSet, task, between
import json
from dotenv import load_dotenv
import os
load_dotenv()
class UserBehavior(TaskSet):
@task
def get_main_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/main/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
@task
def get_recommendation_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/recommend/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
class WebsiteUser(HttpUser):
task_set = UserBehavior
tasks = [UserBehavior]
wait_time = between(1, 4)
locust -f path/locustfile.py --host=https://test-web.host.com
# 현재 위치에 locustfile.py 라는 파일이 존재하면
locust
pip install locust # locust 설치
locust -v # 설치 확인
from locust import HttpUser, TaskSet, task, between
import json
from dotenv import load_dotenv
import os
load_dotenv()
class UserBehavior(TaskSet):
@task
def get_main_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/main/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
@task
def get_recommendation_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/recommend/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
class WebsiteUser(HttpUser):
task_set = UserBehavior
tasks = [UserBehavior]
wait_time = between(1, 4)
locust -f path/locustfile.py --host=https://test-web.host.com
# 현재 위치에 locustfile.py 라는 파일이 존재하면
locust
pip install locust # locust 설치
locust -v # 설치 확인
from locust import HttpUser, TaskSet, task, between
import json
from dotenv import load_dotenv
import os
load_dotenv()
class UserBehavior(TaskSet):
@task
def get_main_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/main/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
@task
def get_recommendation_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/recommend/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
class WebsiteUser(HttpUser):
task_set = UserBehavior
tasks = [UserBehavior]
wait_time = between(1, 4)
locust -f path/locustfile.py --host=https://test-web.host.com
# 현재 위치에 locustfile.py 라는 파일이 존재하면
locust
pip install locust # locust 설치
locust -v # 설치 확인
from locust import HttpUser, TaskSet, task, between
import json
from dotenv import load_dotenv
import os
load_dotenv()
class UserBehavior(TaskSet):
@task
def get_main_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/main/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
@task
def get_recommendation_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/recommend/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
class WebsiteUser(HttpUser):
task_set = UserBehavior
tasks = [UserBehavior]
wait_time = between(1, 4)
locust -f path/locustfile.py --host=https://test-web.host.com
# 현재 위치에 locustfile.py 라는 파일이 존재하면
locust
pip install locust # locust 설치
locust -v # 설치 확인
from locust import HttpUser, TaskSet, task, between
import json
from dotenv import load_dotenv
import os
load_dotenv()
class UserBehavior(TaskSet):
@task
def get_main_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/main/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
@task
def get_recommendation_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/recommend/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
class WebsiteUser(HttpUser):
task_set = UserBehavior
tasks = [UserBehavior]
wait_time = between(1, 4)
locust -f path/locustfile.py --host=https://test-web.host.com
# 현재 위치에 locustfile.py 라는 파일이 존재하면
locust
pip install locust # locust 설치
locust -v # 설치 확인
from locust import HttpUser, TaskSet, task, between
import json
from dotenv import load_dotenv
import os
load_dotenv()
class UserBehavior(TaskSet):
@task
def get_main_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/main/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
@task
def get_recommendation_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/recommend/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
class WebsiteUser(HttpUser):
task_set = UserBehavior
tasks = [UserBehavior]
wait_time = between(1, 4)
locust -f path/locustfile.py --host=https://test-web.host.com
# 현재 위치에 locustfile.py 라는 파일이 존재하면
locust
pip install locust # locust 설치
locust -v # 설치 확인
from locust import HttpUser, TaskSet, task, between
import json
from dotenv import load_dotenv
import os
load_dotenv()
class UserBehavior(TaskSet):
@task
def get_main_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/main/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
@task
def get_recommendation_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/recommend/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
class WebsiteUser(HttpUser):
task_set = UserBehavior
tasks = [UserBehavior]
wait_time = between(1, 4)
locust -f path/locustfile.py --host=https://test-web.host.com
# 현재 위치에 locustfile.py 라는 파일이 존재하면
locust
pip install locust # locust 설치
locust -v # 설치 확인
from locust import HttpUser, TaskSet, task, between
import json
from dotenv import load_dotenv
import os
load_dotenv()
class UserBehavior(TaskSet):
@task
def get_main_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/main/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
@task
def get_recommendation_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/recommend/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
class WebsiteUser(HttpUser):
task_set = UserBehavior
tasks = [UserBehavior]
wait_time = between(1, 4)
locust -f path/locustfile.py --host=https://test-web.host.com
# 현재 위치에 locustfile.py 라는 파일이 존재하면
locust
pip install locust # locust 설치
locust -v # 설치 확인
from locust import HttpUser, TaskSet, task, between
import json
from dotenv import load_dotenv
import os
load_dotenv()
class UserBehavior(TaskSet):
@task
def get_main_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/main/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
@task
def get_recommendation_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/recommend/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
class WebsiteUser(HttpUser):
task_set = UserBehavior
tasks = [UserBehavior]
wait_time = between(1, 4)
locust -f path/locustfile.py --host=https://test-web.host.com
# 현재 위치에 locustfile.py 라는 파일이 존재하면
locust
pip install locust # locust 설치
locust -v # 설치 확인
from locust import HttpUser, TaskSet, task, between
import json
from dotenv import load_dotenv
import os
load_dotenv()
class UserBehavior(TaskSet):
@task
def get_main_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/main/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
@task
def get_recommendation_page(self):
user_encrypted_id = os.environ.get("USER_ENCRYPTED_ID")
host = os.environ.get("HOST")
uri = "https://%s/recommend/%s" % (host, user_encrypted_id)
self.client.get(uri, headers={"Content-Type": "application/*"}, name='getMainPage')
class WebsiteUser(HttpUser):
task_set = UserBehavior
tasks = [UserBehavior]
wait_time = between(1, 4)
locust -f path/locustfile.py --host=https://test-web.host.com
# 현재 위치에 locustfile.py 라는 파일이 존재하면
locust