-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
cookie_in_requests_automatically.yml
45 lines (45 loc) · 1.17 KB
/
cookie_in_requests_automatically.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
desc: Cookie in requests automatically
runners:
req:
endpoint: ${HTTPBIN_END_POINT:-https://httpbin.org/}
useCookie: true
vars:
cookie:
key: "cookie-name"
value: "cookie-value"
debug: ${DEBUG:-false}
steps:
bindUuid:
desc: UUIDs are numbered in the image of a session.
bind:
uuid: faker.UUID()
setCookie:
desc: Returns a set of response headers from the query string.
req:
/response-headers?Set-Cookie={{ vars.cookie.key }}%3D{{ uuid }}:
get:
body: null
test: |
current.res.status == 200
&& current.res.cookies[vars.cookie.key].Name == vars.cookie.key
&& current.res.cookies[vars.cookie.key].Value == uuid
inheritCookie:
desc: Returns cookie data.
req:
/cookies:
get:
body: null
test: |
current.res.status == 200
&& current.res.rawBody != ""
&& current.res.body.cookies[vars.cookie.key] == uuid
disableCookie:
desc: Cookies are disabled when useCookie is turned off
req:
/cookies:
get:
body: null
useCookie: false
test: |
current.res.status == 200
&& len(current.res.body.cookies) == 0