mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
remove unused files
This commit is contained in:
@@ -1,142 +0,0 @@
|
||||
- api:
|
||||
id: get_token
|
||||
name: get token
|
||||
variables:
|
||||
user_agent: XXX
|
||||
device_sn: API_XXX
|
||||
os_platform: XXX
|
||||
app_version: XXX
|
||||
request:
|
||||
url: /api/get-token
|
||||
method: POST
|
||||
headers:
|
||||
user_agent: $user_agent
|
||||
device_sn: $device_sn
|
||||
os_platform: $os_platform
|
||||
app_version: $app_version
|
||||
Content-Type: "application/json"
|
||||
device_sn: $device_sn
|
||||
json:
|
||||
sign: ${get_sign($user_agent, $device_sn, $os_platform, $app_version)}
|
||||
validate:
|
||||
- eq: ["status_code", 0]
|
||||
- len_eq: ["content.token", 12]
|
||||
- contains: [{"a": 1, "b": 2}, "a"]
|
||||
|
||||
- api:
|
||||
id: create_user
|
||||
variables:
|
||||
user_name: user0
|
||||
user_password: "000000"
|
||||
uid: 9000
|
||||
token: XXX
|
||||
request:
|
||||
url: /api/users/$uid
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: "application/json"
|
||||
device_sn: $device_sn
|
||||
token: $token
|
||||
json:
|
||||
name: $user_name
|
||||
password: $user_password
|
||||
validate:
|
||||
- eq: ["status_code", 201]
|
||||
|
||||
- api:
|
||||
id: get_user
|
||||
variables:
|
||||
uid: 9000
|
||||
token: XXX
|
||||
request:
|
||||
url: /api/users/$uid
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: "application/json"
|
||||
device_sn: $device_sn
|
||||
token: $token
|
||||
validate:
|
||||
- eq: ["status_code", 200]
|
||||
|
||||
- api:
|
||||
id: update_user
|
||||
variables:
|
||||
user_name: user0
|
||||
user_password: "000000"
|
||||
uid: 9000
|
||||
token: XXX
|
||||
request:
|
||||
url: /api/users/$uid
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: "application/json"
|
||||
device_sn: $device_sn
|
||||
token: $token
|
||||
json:
|
||||
name: $user_name
|
||||
password: $user_password
|
||||
validate:
|
||||
- eq: ["status_code", 200]
|
||||
|
||||
- api:
|
||||
id: delete_user
|
||||
variables:
|
||||
uid: 9000
|
||||
token: XXX
|
||||
request:
|
||||
url: /api/users/$uid
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: "application/json"
|
||||
device_sn: $device_sn
|
||||
token: $token
|
||||
validate:
|
||||
- eq: ["status_code", 200]
|
||||
|
||||
- api:
|
||||
id: get_users
|
||||
variables:
|
||||
token: XXX
|
||||
request:
|
||||
url: /api/users
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: "application/json"
|
||||
device_sn: $device_sn
|
||||
token: $token
|
||||
validate:
|
||||
- eq: ["status_code", 200]
|
||||
|
||||
- api:
|
||||
id: reset_all
|
||||
variables:
|
||||
token: XXX
|
||||
request:
|
||||
url: /api/reset-all
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: "application/json"
|
||||
device_sn: $device_sn
|
||||
token: $token
|
||||
validate:
|
||||
- eq: ["status_code", 200]
|
||||
- eq: ["content.success", true]
|
||||
|
||||
- api:
|
||||
id: get_headers
|
||||
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()}"]
|
||||
@@ -1,27 +0,0 @@
|
||||
# fix #258
|
||||
- config:
|
||||
name: "user management testcase."
|
||||
variables:
|
||||
user_agent: 'iOS/10.3'
|
||||
device_sn: ${gen_random_string(15)}
|
||||
os_platform: 'ios'
|
||||
app_version: '2.8.6'
|
||||
parameters:
|
||||
- user_agent: ['iOS', 'android']
|
||||
request:
|
||||
base_url: ${get_base_url()}
|
||||
headers:
|
||||
Content-Type: application/json
|
||||
device_sn: $device_sn
|
||||
output:
|
||||
- token
|
||||
|
||||
- test:
|
||||
name: get token with $user_agent, $app_version
|
||||
api: get_token
|
||||
extract:
|
||||
- token: content.token
|
||||
validate:
|
||||
- "eq": ["status_code", 200]
|
||||
- "len_eq": ["content.token", 16]
|
||||
- "contains": [{"a": 1, "b": 2}, "b"]
|
||||
Reference in New Issue
Block a user