@task(1) def CreateCustomer(self): response = self.client.get('/Customer/Create/', name='CustomerCreate') csrftoken = response.cookies['csrftoken'] self.client.post("/Customer/Create/",{ 'csrfmiddlewaretoken': csrftoken, 'customer_name': smart_str(u'veeers'), 'primary_contact': smart_str(u'veereseeree'),} ,headers={"X-CSRFToken": csrftoken},name='Creating')
Here is the code i got from Internet.Its not working for me. Customer has name, primary_contact and some attributes .. i want to save the data from Locust Testing Tool to DB. to know the Performance of post method with some pages
Aucun commentaire:
Enregistrer un commentaire