Created
December 29, 2022 16:19
-
-
Save ManduTheCat/c5adfc9e3e1a7639f20e512788a52447 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from locust import HttpUser, task | |
class ServerTest(HttpUser): | |
def on_start(self): | |
self.home() | |
def on_stop(self): | |
self.logout() | |
def login(self): | |
self.client.post("members/login", { | |
"email" : "test@naver.com", | |
"password" : "1234" | |
}) | |
@task(1) | |
def aptSearch(self): | |
self.client.get("houseDeal/apts/29200000000055") | |
def home(self): | |
self.client.get("") | |
def logout(self): | |
self.client.get("logout/1") | |
@task(2) | |
def filter(self): | |
self.client.get("houseDeal/apts?ha=126.81882881014421&oa=126.83448268627025&pa=35.199581648154684&qa=35.19234841800822&area=100&price=30000") | |
class WebsiteUser(HttpUser): | |
task_set = ServerTest | |
min_wait = 5 | |
max_wait = 1000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment