mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-20 12:02:10 +08:00
save api in individual file: each file is corresponding to one api definition
This commit is contained in:
16
tests/api/get_headers.yml
Normal file
16
tests/api/get_headers.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
variables:
|
||||
n_secs: 1
|
||||
request:
|
||||
url: /headers
|
||||
headers:
|
||||
Content-Type: "application/json"
|
||||
device_sn: $device_sn
|
||||
method: GET
|
||||
setup_hooks:
|
||||
- ${setup_hook_add_kwargs($request)}
|
||||
- ${setup_hook_remove_kwargs($request)}
|
||||
teardown_hooks:
|
||||
- ${teardown_hook_sleep_N_secs($response, $n_secs)}
|
||||
validate:
|
||||
- eq: ["status_code", 200]
|
||||
- contained_by: [content.headers.Host, "${get_httpbin_server()}"]
|
||||
Reference in New Issue
Block a user