MCPcopy
hub / github.com/locustio/locust / WebsiteUser

Class WebsiteUser

examples/nested_inline_tasksets.py:4–26  ·  view source on GitHub ↗

Example of the ability of inline nested TaskSet classes

Source from the content-addressed store, hash-verified

2
3
4class WebsiteUser(HttpUser):
5 """
6 Example of the ability of inline nested TaskSet classes
7 """
8
9 host = "http://127.0.0.1:8089"
10 wait_time = between(2, 5)
11
12 @task
13 class TopLevelTaskSet(TaskSet):
14 @task
15 class IndexTaskSet(TaskSet):
16 @task(10)
17 def index(self):
18 self.client.get("/")
19
20 @task(1)
21 def stop(self):
22 self.interrupt()
23
24 @task
25 def stats(self):
26 self.client.get("/stats/requests")

Callers

nothing calls this directly

Calls 1

betweenFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…