-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathload-test.yml
47 lines (46 loc) · 1013 Bytes
/
load-test.yml
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
42
43
44
45
46
47
config:
target: "{{ $processEnvironment.API_URL }}"
processor: "generator.js"
phases:
- duration: 300
arrivalRate: 100
scenarios:
- name: "Generate products"
weight: 5
flow:
- function: "generateProduct"
- put:
url: "/{{ id }}"
headers:
Content-Type: "application/json"
json:
id: "{{ id }}"
name: "{{ name }}"
price: "{{ price }}"
- loop:
- get:
url: "/{{ id }}"
count: 10
- think: 3
- delete:
url: "/{{ id }}"
- name: "List products and leave"
weight: 1
flow:
- get:
url: "/"
- name: "List products and paginate"
weight: 1
flow:
- get:
url: "/"
capture:
json: "$.next"
as: "next_page"
- get:
url: "/{{ next_page }}"
capture:
json: "$.next"
as: "next_page"
- get:
url: "/{{ next_page }}"