0
我有django(1.6)應用程序,我想用蝗蟲測試它。 我安裝locust==0.7.5
和pyzmq==16.0.2
,我恢復了很多的失敗:下面測試蝗蟲和[Errno 111]連接拒絕
[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
任何關於如何解決錯誤的幫助將不勝感激!
你確定你的應用程序是運行在80端口的命令? –
@FernandoCezar我在127.0.0.1:8000上運行我的應用程序 – Mark
但您的蝗蟲試圖連接到端口80,而不是8000:'ConnectionError(MaxRetryError(「HTTPConnectionPool(host ='127.0.0.1',port = 80) ' –