I wanted to test Locust for my Project on Windows 10. The Script seems to run properly (no Errors in CMD), but i can't connect to the web interface (ERR_CONNECTION_REFUSED).

I am guessing, that this has to do with Browser/Windows config, but i can't find the problem. I have no Proxy set up in Lan settings, i get my ip from DNS, and i have no changes in my hosts file.


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 """

    def on_stop(self):
        """ on_stop is called when the TaskSet is stopping """

    def login(self):
        self.client.post("/login", {"username":"tester", "password":"abcd1234"})

    def logout(self):
        self.client.post("/logout", {"username":"ellen_key", "password":"education"})

    def index(self):

    def profile(self):

class WebsiteUser(HttpLocust):
    task_set = UserBehavior
    min_wait = 5000
    max_wait = 9000



CMD result : [2019-05-13 09:49:45,069] LB6-001-DTMH/INFO/locust.main: Starting web monitor at *:8089 [2019-05-13 09:49:45,070] LB6-001-DTMH/INFO/locust.main: Starting Locust 0.11.0 When i interrupt the script in the command line i get the "KeyboardInterrupt" message and some statistics without data python -m http.server 8089 seems to work

0 Answers