From 97019fb223d931e9ba456e4300b0c7a148276ed0 Mon Sep 17 00:00:00 2001 From: yann Date: Thu, 10 Jul 2025 11:27:44 +0200 Subject: [PATCH] added testing paragraph --- tests/performance_tests/__init__.py | 0 tests/performance_tests/locustfile.py | 28 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/performance_tests/__init__.py create mode 100644 tests/performance_tests/locustfile.py diff --git a/tests/performance_tests/__init__.py b/tests/performance_tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/performance_tests/locustfile.py b/tests/performance_tests/locustfile.py new file mode 100644 index 0000000..bc13208 --- /dev/null +++ b/tests/performance_tests/locustfile.py @@ -0,0 +1,28 @@ +from locust import HttpUser, task + + +class PerfConnectionTest(HttpUser): + + @task + def index(self): + response = self.client.get("/") + + @task + def login(self): + response = self.client.post("/showSummary", {"email": "admin@irontemple.com"}) + + + +class PerfBookTest(HttpUser): + + @task + def bookPlaces(self): + response = self.client.post("/showSummary", {"email": "admin@irontemple.com"}) + response = self.client.post("/purchasePlaces", {"club": "Iron Temple", "competition": "Fall Classic", "places": 2}) + + +class PerfBoard(HttpUser): + + @task + def board(self): + response = self.client.get("/points")