We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
0 parents commit 475e79dCopy full SHA for 475e79d
1 file changed
locustfile.py
@@ -0,0 +1,15 @@
1
+from locust.clients import HttpSession
2
+
3
4
+def test_task(session: HttpSession):
5
+ session.base_url = "https://mock-test-target.eu-north-1.locust.cloud"
6
7
+ session.post("/authenticate", json={"username": "foo", "password": "bar"})
8
9
+ for product_id in [1, 2, 42, 4711]:
10
+ session.post("/cart/add", json={"productId": product_id})
11
12
+ with session.post("/checkout/confirm", catch_response=True) as resp:
13
+ if not resp.json().get("orderId"):
14
+ resp.failure("orderId missing")
15
+ resp.raise_for_status()
0 commit comments