-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbody_formdata.yaml
37 lines (31 loc) · 1005 Bytes
/
body_formdata.yaml
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
# Run this file with the test-server, then specify the PORT as a parameter to this try or run script.
# This file also requires a PASSWORD environment variable. Any value will work and the the password will be scrubbed from the logs.
# This version will always put in new sessions and slowly replace the old ones
vars:
port: ${PORT}
username: test-user
password: test-password
dev_key: dev-key-001
load_pattern:
- linear:
from: 100%
to: 100%
over: 15s
loggers:
test:
to: stdout
endpoints:
- method: POST
url: http://localhost:${port}
headers:
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
body: username=${username}&password=${password}&grant_type=password&client_id=${dev_key}&token=abcd-1234-efgh
peak_load: 1hps
logs:
test:
select:
ts: epoch("ms")
response: request.body
token: match(response.body, "token=(?P<token>[a-zA-Z0-9-]+)").token
on_demand: true