diff options
Diffstat (limited to 'test/mitmproxy/test_flow_export/locust_get.py')
-rw-r--r-- | test/mitmproxy/test_flow_export/locust_get.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/mitmproxy/test_flow_export/locust_get.py b/test/mitmproxy/test_flow_export/locust_get.py new file mode 100644 index 00000000..72d5932a --- /dev/null +++ b/test/mitmproxy/test_flow_export/locust_get.py @@ -0,0 +1,29 @@ +from locust import HttpLocust, TaskSet, task + +class UserBehavior(TaskSet): + def on_start(self): + ''' on_start is called when a Locust start before any task is scheduled ''' + self.path() + + @task() + def path(self): + url = self.locust.host + '/path' + + headers = { + 'header': 'qvalue', + 'content-length': '7', + } + + self.response = self.client.request( + method='GET', + url=url, + headers=headers, + ) + + ### Additional tasks can go here ### + + +class WebsiteUser(HttpLocust): + task_set = UserBehavior + min_wait = 1000 + max_wait = 3000 |