-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUserTest.py
41 lines (35 loc) · 1.09 KB
/
UserTest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from locust import HttpUser, between, task
class WebsiteUser(HttpUser):
wait_time = between(5, 15)
@task
def user_create(self):
payload = {
"id": 249897,
"username": "denemekullanici",
"firstName": "deneme",
"lastName": "kullanici",
"email": "denemekullanici@gmail.com",
"password": "123456789",
"phone": "5962264319",
"userStatus": 0
}
self.client.post("/v2/user", json=payload)
@task
def user_update(self):
payload = {
"id": 24985,
"username": "guncelkullanici",
"firstName": "guncel",
"lastName": "kullanici",
"email": "guncelkullanici@gmail.com",
"password": "123456",
"phone": "5952126585",
"userStatus": 0
}
self.client.put("/v2/user/denemekullanici", json=payload)
@task
def get_user_info(self):
self.client.get("/v2/user/denemekullanici")
@task
def user_delete(self):
self.client.delete("/v2/user/denemekullanici")