🙄
Locust導入メモ【2023年1月】
環境
Mac M1 Monterey
pip 20.3.4
インストール
$ pip3 install locust
導入できたか確認
$ locust -V
locust 2.14.2 from ~~~
導入これだけ。便利
テスト
テストファイル作成
locustfile.py
from locust import HttpUser, task
class HelloWorldUser(HttpUser):
@task
def hello_world(self):
self.client.get("/hello")
self.client.get("/world")
$ cd /locustfile.pyのあるフォルダ
# 起動
$ locust
起動したら以下にアクセス
Discussion