Created
August 24, 2020 23:17
-
-
Save madcodemonkey/d04970ab3bb333131b4dad3785679979 to your computer and use it in GitHub Desktop.
Locust test file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from locust import HttpUser, task, between | |
class QuickstartUser(HttpUser): | |
wait_time = between(5, 9) | |
host="https://api.openbrewerydb.org" | |
@task | |
def index_page(self): | |
result = self.client.get("/breweries") | |
print(result.text) | |
print(result.status_code) | |
if __name__ == '__main__': | |
MyUser().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment