Skip to content

Commit 1575ddc

Browse files
Create BasicLocustTest.py
1 parent 43fb5b9 commit 1575ddc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/BasicLocustTest.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import os
2+
from locust import HttpUser, constant_throughput, task
3+
4+
protocol = os.getenv("protocol", "https")
5+
host = os.getenv("domain", "example.com")
6+
base_url = f"{protocol}://{host}"
7+
8+
9+
class WebsiteUser(HttpUser):
10+
host = base_url
11+
wait_time = constant_throughput(1)
12+
13+
@task
14+
def mainPage(self):
15+
self.client.get("/", name="Homepage")

0 commit comments

Comments
 (0)