我使用蝗蟲來壓力測試我們的應用程序。我在哪裏可以找到蝗蟲日誌?
我收到錯誤,因爲POST調用看起來不正確。我在哪裏可以看到蝗蟲的日誌?我希望看到後來看看發生了什麼問題。
這裏是我的代碼的情況下,有人能告訴我,我做錯了什麼:
from locust import HttpLocust, TaskSet, task
json3 = """{"stack_name": "beenz-php-app-12", "disable_rollback": true, "template": "php", "timeout_mins": 60}"""
class MyTaskSet(TaskSet):
@task
def send(self):
response = self.client.post("/stacks", json3, headers={'X-Auth-Key': 'xxxx', 'Content-Type': 'application/json', 'X-Auth-User': 'xxxx', 'Accept': 'application/json', 'X-Auth-Token':'xxxx'})
print "Response status code:", response.status_code
print "Response content:", response.content
class MyLocust(HttpLocust):
task_set = MyTaskSet
min_wait = 5000
max_wait = 15000
謝謝!
我在Locust中看到這個錯誤:HTTPError('500服務器錯誤:服務器錯誤') – Beenz 2014-09-26 13:52:41