Skip to content

Instantly share code, notes, and snippets.

@phouverneyuff
Created May 17, 2019 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phouverneyuff/da808724492ed0bdba93a49281eb911b to your computer and use it in GitHub Desktop.
Save phouverneyuff/da808724492ed0bdba93a49281eb911b to your computer and use it in GitHub Desktop.
from locust import HttpLocust, TaskSet, task
class UserBehavior(TaskSet):
headers = {'content-type': 'application/json'}
@task(300)
def postContaCorrente(l):
payload = {"numero_conta": 1, "cpf": "12000", "valor_saldo": 1000000000.0, "nome_titular": "Zé pilintra"}
l.client.post("/exemplo/contacorrente", json=payload)
class WebsiteUser(HttpLocust):
task_set = UserBehavior
min_wait = 5000
max_wait = 9000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment