我有 django (1.6) 应用程序,我想用蝗虫测试它。我安装locust==0.7.5
并pyzmq==16.0.2
恢复了很多失败:[Errno 111] Connection refused'
下面的更多详细信息
当我使用命令运行应用程序时:locust --host=http://127.0.0.1
我收到以下错误:
ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.0.1', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f7639d89750>: Failed to establish a new connection: [Errno 111] Connection refused',))",),)
我的蝗虫文件:
from locust import TaskSet, HttpLocust, task
class UserBehavior(TaskSet):
@task
def home(self):
self.client.get('/')
@task
def programm(self):
self.client.get('/programm')
class WebsiteUser(HttpLocust):
task_set = UserBehavior
任何有关如何解决错误的帮助将不胜感激!