-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathload_test.py
More file actions
36 lines (27 loc) · 721 Bytes
/
load_test.py
File metadata and controls
36 lines (27 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from locust import HttpUser, between, task
class WebsiteUser(HttpUser):
wait_time = between(1, 5)
def on_start(self):
self.client.post("/api/users/login/", {
"username": "username",
"password": "password"
})
@task
def index(self):
self.client.get("/")
self.client.get("/profile")
@task
def about(self):
self.client.get("/about/")
@task
def home(self):
self.client.get("/home")
@task
def competition(self):
self.client.get("/competition")
@task
def refer(self):
self.client.get("/refer")
@task
def course(self):
self.client.get("/courses/1")