- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.py
More file actions
Latest commit
22 lines (17 loc) · 547 Bytes
/
Copy pathscript.py
File metadata and controls
22 lines (17 loc) · 547 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
fromlocustimportHttpLocust, TaskSet, task
classUserBehavior(TaskSet):
defon_start(self):
""" on_start is called when a Locust start before any task is scheduled """
self.login()
deflogin(self):
self.client.post("/login", {"username":"ellen_key", "password":"education"})
@task(2)
defindex(self):
self.client.get("/")
@task(1)
defprofile(self):
self.client.get("/profile")
classWebsiteUser(HttpLocust):
task_set=UserBehavior
min_wait=5000
max_wait=9000