change: update unit tests for removing v1 format

This commit is contained in:
debugtalk
2020-04-09 11:46:13 +08:00
parent d98fbc8da7
commit 7ba22b1389
37 changed files with 205 additions and 686 deletions

View File

@@ -1,34 +1,30 @@
[
{
"config": {
"id": "create_user",
"variables": {
"device_sn": "TESTCASE_CREATE_XXX",
"uid": 9001
},
"output": [
"session_token"
],
"base_url": "http://127.0.0.1:5000",
"name": "create user and check result."
}
{
"config": {
"id": "create_user",
"variables": {
"device_sn": "TESTCASE_CREATE_XXX",
"uid": 9001
},
"output": [
"session_token"
],
"base_url": "http://127.0.0.1:5000",
"name": "create user and check result."
},
{
"test": {
"teststeps": [
{
"testcase": "testcases/setup.yml",
"extract": [
"session_token"
],
"name": "setup and reset all (override) for $device_sn."
}
},
{
"test": {
},
{
"testcase": "testcases/deps/check_and_create.yml",
"variables": {
"token": "$session_token"
},
"name": "create user and check result."
}
}
]
]
}

View File

@@ -1,30 +0,0 @@
{
"config": {
"id": "create_user",
"variables": {
"device_sn": "TESTCASE_CREATE_XXX",
"uid": 9001
},
"output": [
"session_token"
],
"base_url": "http://127.0.0.1:5000",
"name": "create user and check result."
},
"teststeps": [
{
"testcase": "testcases/setup.yml",
"extract": [
"session_token"
],
"name": "setup and reset all (override) for $device_sn."
},
{
"testcase": "testcases/deps/check_and_create.yml",
"variables": {
"token": "$session_token"
},
"name": "create user and check result."
}
]
}

View File

@@ -1,21 +0,0 @@
config:
name: "create user and check result."
id: create_user
base_url: "http://127.0.0.1:5000"
variables:
uid: 9001
device_sn: "TESTCASE_CREATE_XXX"
export:
- session_token
teststeps:
-
name: setup and reset all (override) for $device_sn.
testcase: testcases/setup.yml
extract:
- session_token
-
name: create user and check result.
variables:
token: $session_token
testcase: testcases/deps/check_and_create.yml

View File

@@ -1,5 +1,4 @@
- config:
config:
name: "create user and check result."
id: create_user
base_url: "http://127.0.0.1:5000"
@@ -9,13 +8,13 @@
export:
- session_token
- test:
teststeps:
-
name: setup and reset all (override) for $device_sn.
testcase: testcases/setup.yml
extract:
- session_token
- test:
-
name: create user and check result.
variables:
token: $session_token

View File

@@ -1,4 +1,4 @@
- config:
config:
name: "create user and check result."
id: create_and_check
base_url: "http://127.0.0.1:5000"
@@ -6,7 +6,8 @@
uid: 9001
device_sn: "TESTCASE_CREATE_XXX"
- test:
teststeps:
-
name: make sure user $uid does not exist
api: api/get_user.yml
variables:
@@ -16,7 +17,7 @@
- eq: ["status_code", 404]
- eq: ["content.success", false]
- test:
-
name: create user $uid for $device_sn
api: api/create_user.yml
variables:
@@ -28,7 +29,7 @@
- eq: ["status_code", 201]
- eq: ["content.success", true]
- test:
-
name: check if user $uid exists
api: api/get_user.yml
variables:

View File

@@ -1,59 +1,43 @@
[
{
"config": {
"name": "setup and reset all.",
"output": [
"session_token"
],
"verify": false,
"variables": {
"device_sn": "TESTCASE_SETUP_XXX",
"app_version": "2.8.6",
"os_platform": "ios",
"user_agent": "iOS/10.3"
},
"base_url": "http://127.0.0.1:5000",
"id": "setup_and_reset"
}
{
"config": {
"name": "setup and reset all.",
"base_url": "http://127.0.0.1:5000",
"variables": {
"device_sn": "TESTCASE_SETUP_XXX",
"app_version": "2.8.6",
"os_platform": "ios",
"user_agent": "iOS/10.3"
},
"id": "setup_and_reset",
"verify": false,
"output": [
"session_token"
]
},
{
"test": {
"validate": [
{
"eq": [
"status_code",
200
]
},
{
"len_eq": [
"content.token",
16
]
}
],
"teststeps": [
{
"name": "get token (setup)",
"api": "api/get_token.yml",
"extract": [
{
"session_token": "content.token"
}
],
"variables": {
"device_sn": "$device_sn",
"app_version": "2.8.6",
"os_platform": "ios",
"user_agent": "iOS/10.3"
},
"name": "get token (setup)"
}
},
{
"test": {
"extract": [
{"session_token": "content.token"}
],
"validate": [
{"eq": ["status_code", 200]},
{"len_eq": ["content.token", 16]}
]
},
{
"name": "reset all users",
"api": "api/reset_all.yml",
"variables": {
"token": "$session_token"
},
"api": "api/reset_all.yml",
"name": "reset all users"
}
}
}
]
]
}

View File

@@ -1,43 +0,0 @@
{
"config": {
"name": "setup and reset all.",
"base_url": "http://127.0.0.1:5000",
"variables": {
"device_sn": "TESTCASE_SETUP_XXX",
"app_version": "2.8.6",
"os_platform": "ios",
"user_agent": "iOS/10.3"
},
"id": "setup_and_reset",
"verify": false,
"output": [
"session_token"
]
},
"teststeps": [
{
"name": "get token (setup)",
"api": "api/get_token.yml",
"variables": {
"device_sn": "$device_sn",
"app_version": "2.8.6",
"os_platform": "ios",
"user_agent": "iOS/10.3"
},
"extract": [
{"session_token": "content.token"}
],
"validate": [
{"eq": ["status_code", 200]},
{"len_eq": ["content.token", 16]}
]
},
{
"name": "reset all users",
"api": "api/reset_all.yml",
"variables": {
"token": "$session_token"
}
}
]
}

View File

@@ -1,32 +0,0 @@
config:
name: "setup and reset all."
id: setup_and_reset
variables:
user_agent: 'iOS/10.3'
device_sn: "TESTCASE_SETUP_XXX"
os_platform: 'ios'
app_version: '2.8.6'
base_url: "http://127.0.0.1:5000"
verify: False
export:
- session_token
teststeps:
-
name: get token (setup)
api: api/get_token.yml
variables:
user_agent: 'iOS/10.3'
device_sn: $device_sn
os_platform: 'ios'
app_version: '2.8.6'
extract:
- session_token: content.token
validate:
- eq: ["status_code", 200]
- len_eq: ["content.token", 16]
-
name: reset all users
api: api/reset_all.yml
variables:
token: $session_token

View File

@@ -1,4 +1,4 @@
- config:
config:
name: "setup and reset all."
id: setup_and_reset
variables:
@@ -11,7 +11,8 @@
export:
- session_token
- test:
teststeps:
-
name: get token (setup)
api: api/get_token.yml
variables:
@@ -24,8 +25,7 @@
validate:
- eq: ["status_code", 200]
- len_eq: ["content.token", 16]
- test:
-
name: reset all users
api: api/reset_all.yml
variables: