Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save madcodemonkey/d04970ab3bb333131b4dad3785679979 to your computer and use it in GitHub Desktop.
Save madcodemonkey/d04970ab3bb333131b4dad3785679979 to your computer and use it in GitHub Desktop.
Locust test file
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