Remote Terminal Backend Servic
2021-10-06 19:39:05 0 举报
AI智能生成
Functional test
作者其他创作
大纲/内容
API List Sessions GET
(no need authorization)
method check
valid
GET
invalid
POST
checklist
GET
POST
error code=405
{
"detail": "Method Not Allowed"
}
pass check
PUT
error code=405
{
"detail": "Method Not Allowed"
}
pass check
DELETE
error code=405
{
"detail": "Method Not Allowed"
}
pass check
HEAD
error code=405
{
"detail": "Method Not Allowed"
}
pass check
OPTIONS
error code=405
{
"detail": "Method Not Allowed"
}
pass check
API data check
request struct
headers
Authorization
valid
valid token
status code : 200, no error code or message
invalid
expired token
status code = 401
{
"detail": "Invalid token. Signature has expired"
}
pass check
checklist
token
empty
status code = 403
{
"detail": "Not authenticated"
}
pass check
expired token
status code = 401
{
"detail": "Invalid token. Signature has expired"
}
pass check
error token
status code = 401
{
"detail": "Invalid token"
}
pass check
valid token
status code : 200, no error code or message
pass check
content of URL
Empty
list all sessions
pass check
Not Empty
field check
username【optional】
valid
invalid
checklist
check length
no limitation
Super long string(296)
【status code = 500】
{
"detail": "Failed to list sessions"
}
pass check
check content
right the key and value
username:mingrui.wang
【status code = 200】
display all sessions belonging to mingrui.wang
pass check
right the key , value is incomplete
username:mingrui
【status code = 200】
{
"detail": "Complete",
"sessions": []
}
pass check
capitalized or not
sensitive to capitalized
username:Mingrui.Wang
【status code = 200】
{
"detail": "Complete",
"sessions": []
}
pass check
just the key, no value
username:
【status code = 200】
{
"detail": "Complete",
"sessions": []
}
pass check
" " (space)
username:
【status code = 200】
{
"detail": "Complete",
"sessions": []
}
pass check
" a bc "(with space in front and the end)
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
escape characters
\r \n \t \\
【status code = 500】
{
"detail": "Failed to list sessions"
}
pass check
"<>?!@#$%^&*()"
【status code = 500】
{
"detail": "Failed to list sessions"
}
"😁😂😃😄😅😆"
【status code = 500】
{
"detail": "Failed to list sessions"
}
"1,2,3"(with comma)
【status code = 200】
{
"detail": "Complete",
"sessions": []
}
"1.3"(with dot)
【status code = 200】
{
"detail": "Complete",
"sessions": []
}
pass check
"-"(contain dash/hyphen下划线 连字符)
【status code = 200】
{
"detail": "Complete",
"sessions": []
}
pass check
"abc123"(alphanumeric同时含有字母与数字)
【status code = 200】
{
"detail": "Complete",
"sessions": []
}
pass check
starts with %
input %25
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
input %20
it should be map to " "
【status code = 200】
{
"detail": "Complete",
"sessions": []
}
pass check
Chinese character简体中文。明瑞
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
other valid key in response
detail
this key and value is ignored
name
this key and value is ignored
image_tag
this key and value is ignored
status
this key and value is ignored
host
this key and value is ignored
port
this key and value is ignored
logic check
duplicate field
same value
should be OK, same response
username : mingrui.wang
username : mingrui.wang
【status code = 200】
display all sessions belonging to mingrui.wang
pass check
different value
the response is consistent with last value
username : mingrui.wang
username : desmond.yeohtb
【status code = 200】
display all sessions belonging to desmond.yeohtb
pass check
add useless field
should not be affected
pass check
response struct
Response data keep same with definition
Successful Response【status_code = 200】
Method Not Allowed【status_code = 405】
Internal Server Error【status_code = 500】
Logic check
API Get session info GET
(no need authorization)
method check
valid
GET
invalid
POST
checklist
GET
pass check
POST
PUT
error code=405
{
"detail": "Method Not Allowed"
}
pass check
DELETE
切换到API Delete a session DELETE
pass check
HEAD
error code=405
{
"detail": "Method Not Allowed"
}
pass check
OPTIONS
error code=405
{
"detail": "Method Not Allowed"
}
pass check
API data check
request struct
headers
Authorization
valid
valid token
status code : 200, no error code or message
invalid
expired token
status code = 401
{
"detail": "Invalid token. Signature has expired"
}
pass check
checklist
token
empty
status code = 403
{
"detail": "Not authenticated"
}
pass check
expired token
status code = 401
{
"detail": "Invalid token. Signature has expired"
}
pass check
error token
status code = 401
{
"detail": "Invalid token"
}
pass check
valid token
status code : 200, no error code or message
pass check
content of URL
Empty
【status code= 422】
detail.msg="field required"
pass check
Not Empty
field check
name【required】
valid
invalid
checklist
check length(max is 63)
equal 63
【status code = 404】
{
"detail": "`1-3333-jjkdkjahsdkjhsakjhdkjsahjdkajsdkjhsadhksahfkjsahfkjshafh` does not exist"
}
pass check
greater than 63
【status code = 422】
response.body.msg=ensure this value has at most 63 characters
pass check
check content
right the key and value
name:rt-mingrui-wang-1
【status code = 200】
display session whose name is
pass check
right the key , value is incomplete
name:rt-mingrui
【status code = 404】
{
"detail": "`rt-mingrui` does not exist"
}
pass check
right the key , value is not exits
name:rt-mingrui-wang-12
【status code = 404】
{
"detail": "`rt-mingrui-wang-12` does not exist"
}
pass check
capitalized or not
sensitive to capitalized
name:RT-mingrui-wang-1
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
just the key, no value
name:
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
" " (space)
name:
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
" a bc "(with space in front and the end)
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
escape characters
\r \n \t \\
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"<>?!@#$%^&*()"
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"😁😂😃😄😅😆"
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"1,2,3"(with comma)
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"1.3"(with dot)
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"-"(contain dash/hyphen下划线 连字符)
连字符 is valid :
name:rt-mingrui-wang-1
【status code = 200】
display all sessions belonging to mingrui.wang
pass check
下划线 is invalid :
name:rt_mingrui_wang_1
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"abc123"(alphanumeric同时含有字母与数字)
【status code = 404】
Not Found
pass check
starts with %
input %25
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
input %20
it should be map to " "
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
Chinese character简体中文。明瑞
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
other valid key in response
detail
this key and value is ignored
name
this key and value is ignored
image_tag
this key and value is ignored
status
this key and value is ignored
host
this key and value is ignored
port
this key and value is ignored
logic check
duplicate field
same value
should be OK, same response
name : rt-desmond-yeohtb-0
name : rt-desmond-yeohtb-0
【status code = 200】
display session whose name is rt-desmond-yeohtb-0
pass check
different value
the response is consistent with last value
name : rt-mingrui-wang-1
name : rt-desmond-yeohtb-0
【status code = 200】
display session whose name is rt-desmond-yeohtb-0
pass check
add useless field
should not be affected
pass check
length of URL(header and body)
length >= Max.Length
this scenario will not happen
length < Max.Length
【status_code = 200】
pass check
response struct
Response data keep same with definition
Successful Response【status_code = 200】
Not Found【status_code = 404】
Method Not Allowed【status_code = 405】
Logic check
API Create a new session POST
(need authorization)
method check
valid
POST
invalid
GET
checklist
GET
POST
no Authorization
{
"detail": [
{
"loc": [
"header",
"authorization"
],
"msg": "field required",
"type": "value_error.missing"
},
{
"loc": [
"body"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}
"detail": [
{
"loc": [
"header",
"authorization"
],
"msg": "field required",
"type": "value_error.missing"
},
{
"loc": [
"body"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}
PUT
error code=405
{
"detail": "Method Not Allowed"
}
pass check
DELETE
切换到API Delete a specific job DELETE
pass check
HEAD
error code=405
{
"detail": "Method Not Allowed"
}
pass check
OPTIONS
error code=405
{
"detail": "Method Not Allowed"
}
pass check
API data check
request struct
headers
Content-Type
valid
application/json
invalid
wrong type
checklist
no this key
need a param filled
application/json
pass check
space
【status code= 422】
{
"detail": "Value is not a valid dict at body"
}
pass check
application/pdf
【status code= 422】
{
"detail": "Value is not a valid dict at body"
}
pass check
application/xhtml+xml
【status code= 422】
{
"detail": "Value is not a valid dict at body"
}
pass check
text/html
【status code= 422】
{
"detail": "Value is not a valid dict at body"
}
pass check
text/plain
【status code= 422】
{
"detail": "Value is not a valid dict at body"
}
pass check
text/xml
【status code= 422】
{
"detail": "Value is not a valid dict at body"
}
pass check
Authorization
valid
valid token
status code : 200, no error code or message
invalid
expired token
status code = 401
{
"detail": "Invalid token. Signature has expired"
}
pass check
checklist
token
empty
status code = 403
{
"detail": "Not authenticated"
}
pass check
expired token
status code = 401
{
"detail": "Invalid token. Signature has expired"
}
pass check
error token
status code = 401
{
"detail": "Invalid token"
}
pass check
valid token
status code : 200, no error code or message
pass check
body
Empty
Not Empty
content check
name【string optional】
placeholder
<= 63 characters ^[a-z0-9]([a-z0-9-]+[a-z0-9])?$
checklist
check length(max is 63)
equal 63
【status code = 200】
{
"detail": "complete"
}
pass check
greater than 63
【status code = 422】
response.body.msg=ensure this value has at most 63 characters
pass check
check content
right the key and value
body:
{
"name":"rt-qin-zhang-1"
}
【status code = 200】
response.session.status=ContainerCreating
response.session.host=null
response.session.port=null
pass check
capitalized or not
sensitive to capitalized
name:Rt-qin-zhang-1
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
just the key, no value
name:
【status code = 422】
response.body.msg="Expecting value: line 2 column 12 (char 13)"
pass check
" " (space)
name:
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
" a bc "(with space in front and the end)
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
escape characters
\r \n \t \\
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"<>?!@#$%^&*()"
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"😁😂😃😄😅😆"
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"1,2,3"(with comma)
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"1.3"(with dot)
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"-"(contain dash/hyphen下划线 连字符)
下划线 is invalid
input:1_3
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
连字符 is valid
input:1-3
【status code = 200】
{
"detail": "complete"
}
pass check
"abc123"(alphanumeric同时含有字母与数字)
【status code = 200】
{
"detail": "complete"
}
pass check
starts with %
input %25
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
input %20
it should be map to " "
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
Chinese character简体中文。明瑞
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
other valid key in response
detail
this key and value is ignored
username
this key and value is ignored
image_tag
this key and value is ignored
status
this key and value is ignored
host
this key and value is ignored
port
this key and value is ignored
base_image_tag【string optional】
default value
ubuntu:16.04
optional image
ubuntu:16.04
nvidia/cuda:10.1-cudnn7-devel-ubuntu16.04
必须和accelerator nvidia-tesla-v100搭配使用
check list
non-optional images
other characters, meet without/with format
【no format check】
【status code = 200】
use default base_image_tage
pass check
optional images
base image
ubuntu:16.04
nvidia image
nvidia/cuda:10.1-cudnn7-devel-ubuntu16.04
+ accelerator nvidia-tesla-v100
【status code = 200】
pass check
only 【nvidia/cuda:10.1-cudnn7-devel-ubuntu16.04】
【status code = 200】
pass check
difference between above two post
should
"ssh sessionName"
"nvidia-smi" can differ whether this session has GPU
request_cpu【string optional】
placeholder
^(\d+(?:\.\d+)?)(m)?$
default value
0.1
check list
check content
Boundary value
100000000 create success
status pending
max : 31 CPU
pass check
contain “m”
m means Milli cpu
1cpu = 1000m cpu
input 1000m
【status code = 200】
1 cpu
pass check
no contain “m”
use per Cpu as unit
pass check
check type
float 0.2
【status code = 200】
200m cpu
pass check
string abc
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
array [123]
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
bool true
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
negative
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
request_memory【string optional】
placeholder
^(\d+(?:\.\d+)?)([KMGT]i?)?$
default value
1Gi
check list
check content
contain [KMGT]
contain [KMGT] and contain [KMGT]i
are all ok, [KMGT]<[KMGT]i
{
"request_memory":"1Gi",
"limit_memory": "1G"
}
【status code = 422】
{
"detail": "Failed to create session due to `Deployment.apps \"rt-qin-zhang-28\" is invalid: spec.template.spec.containers[0].resources.requests: Invalid value: \"1Gi\": must be less than or equal to memory limit`"
}
pass check
{
"request_memory":"1G",
"limit_memory": "1Gi"
}
【status code = 200】
pass check
no contain [KMGT]
{
"request_memory":"1",
"limit_memory": "1"
}
【status code = 200】
means 1 bytes
pass check
note : no unit represent 1 bytes
check type
float 0.2
string abc
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
array [123]
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
bool true
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
negative
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
equation value check
theoretically, 8Gi= 8192Mi =8388608Ki
input 64Gi, 65536Mi ,6710886Ki
【status code = 200】
equivalent
pass check
capital sensitive check
input 8GI
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
limit_cpu【string optional】
placeholder
^(\d+(?:\.\d+)?)(m)?$
default value
0.1
check list
check content
Boundary value
100000000 create success
status pending
max : 31 CPU
pass check
contain “m”
m means Milli cpu
1cpu = 1000m cpu
input 1000m
【status code = 200】
1 cpu
pass check
no contain “m”
use per Cpu as unit
pass check
check type
float 0.2
【status code = 200】
means 200m cpu
pass check
string abc
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
array [123]
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
bool true
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
negative
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
combination with request_cpu
limite cpu >= request cpu
limite cpu < request cpu
create fail
limit_memory【string optional】
placeholder
^(\d+(?:\.\d+)?)([KMGT]i?)?$
default value
1Gi
check list
check content
contain [KMGT]i
input 1Mi
【status code = 200】
"request_memory": "1Mi",
pass check
no contain [KMGT]i
input 1
【status code = 200】
"request_memory": "1",
pass check
check type
float 1.8
input 1.8Gi
【status code = 200】
"limit_memory": "1932735283200m",
1932735283200/1000/1024/1024/1024=1.8Gi
pass check
string abc
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
array [123]
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
bool true
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
negative
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
combination with request_memory
limit memory > request memory
create fail
pc:limit_memory = 1Gi
{
"request_memory":"2048Gi"
}
limit memory <= request memory
create fail
pc:limit_memory = 1Gi
{
"request_memory":"2048Gi"
}
【status code = 422】
{
"detail": "Failed to create session due to `Deployment.apps \"rt-qin-zhang-8\" is invalid: spec.template.spec.containers[0].resources.requests: Invalid value: \"2Ti\": must be less than or equal to memory limit`"
}
pass check
equation value check
theoretically, 8Gi= 8192Mi =8388608Ki
input 64Gi, 65536Mi ,6710886Ki
【status code = 200】
equivalent
pass check
capital sensitive check
input 8GI
【status code = 422】
{
"detail": "String does not match regex \"^(\\d+(?:\\.\\d+)?)([kmgt]i?)?$\" at body.request_memory"
}
pass check
accelerator【string optional】
default value
None
nvidia-tesla-v100
check list
check content
check length
logic check
duplicate field
same value
should be OK, same response
different value
should be OK
the response is consistent with first value
add useless field
request not be affected
【status_code = 200】
pass check
response struct
Response data keep same with definition
Successful Response【status_code=200】
Invalid token【status_code = 401】
Not authenticated【status_code = 403】
Method Not Allowed【status_code = 405】
Fail to Create Job due to Conflict【status_code = 409】
Validation Error【status_code = 422】
Internal Server Error【status_code = 500】
Logic check
API Delete a running session DELETE
(need authorization)
method check
valid
DELETE
invalid
POST
PUT
checklist
GET
Switch to API Get session GET
name = null
name = xx (xx is exist)
name = xx (xx is not exist)
DELETE
(need authentic)
name = null
name = xx (xx is exist)
name = xx (xx is not exist)
POST
(need authentic)
Switch to API Create a new session POST
name = null
name = xx (xx is exist)
name = xx (xx is not exist)
PUT
【status_code = 405】
response body.detail=Method Not Allowed
pass check
HEAD
【status_code = 405】
no response no message
pass check
OPTIONS
【status_code = 405】
no response no message
pass check
API data check
request struct
headers
Authorization
valid
valid token
status code : 200, no error code or message
invalid
expired token
status code = 401
{
"detail": "Invalid token. Signature has expired"
}
pass check
checklist
token
empty
status code = 403
{
"detail": "Not authenticated"
}
pass check
expired token
status code = 401
{
"detail": "Invalid token. Signature has expired"
}
pass check
error token
status code = 401
{
"detail": "Invalid token"
}
pass check
valid token
status code : 200, no error code or message
pass check
content of URL
Empty
【status_code = 422】
response body.detail=field required
pass check
Not Empty
content check
name【string required】
valid
invalid
checklist
check length(max is 63)
equal 63
【status code = 404】
{
"detail": "`1-3333-jjkdkjahsdkjhsakjhdkjsahjdkajsdkjhsadhksahfkjsahfkjshafh` does not exist"
}
pass check
greater than 63
【status code = 422】
response.body.msg=ensure this value has at most 63 characters
pass check
check content
right the key and value
pc:
user A : qin.zhang
user B: mingrui.wang
user A's token to delete B's session
name:rt-mingrui-wang-1
【status code = 400】
{
"detail": "User is not permitted to delete session"
}
pass check
user A's token to delete A's session
name:rt-qin-zhang-1
【status code = 200】
{
"detail": "Complete"
}
pass check
right the key , value is incomplete
name:rt-qin-zhang
【status code = 404】
{
"detail": "`rt-qin-zhang` does not exist"
}
pass check
capitalized or not
sensitive to capitalized
username:Rt-qin-zhang-1
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
just the key, no value
name:
【status code = 422】
response.body.msg="Expecting value: line 2 column 12 (char 13)"
pass check
" " (space)
name:
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
" a bc "(with space in front and the end)
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
escape characters
\r \n \t \\
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"<>?!@#$%^&*()"
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"😁😂😃😄😅😆"
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"1,2,3"(with comma)
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"1.3"(with dot)
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
"-"(contain dash/hyphen下划线 连字符)
下划线 is invalid
input:1_3
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
连字符 is valid
input:1-3
【status code = 404】
{
"detail": "`1-3` does not exist"
}
pass check
"abc123"(alphanumeric同时含有字母与数字)
【status code = 404】
{
"detail": "`abc123` does not exist"
}
pass check
starts with %
input %25
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
input %20
it should be map to " "
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
Chinese character简体中文。明瑞
【status code = 422】
response.body.msg="string does not match regex \"^[a-z0-9]([a-z0-9-]+[a-z0-9])?$\""
pass check
other valid key in response
detail
this key and value is ignored
username
this key and value is ignored
image_tag
this key and value is ignored
status
this key and value is ignored
host
this key and value is ignored
port
this key and value is ignored
logic check
duplicate field
same value
should be OK, same response
name : rt-mingrui-wang-1
name : rt-mingrui-wang-1
【status code = 200】
delete rt-mingrui-wang-1
pass check
different value
the response is consistent with last value
name : rt-mingrui-wang-1
name : rt-mingrui-wang-2
【status code = 200】
delete rt-mingrui-wang-2
pass check
add useless field
should not be affected
name : rt-mingrui-wang-1
name : rt-mingrui-wang-2
first:test
【status code = 200】
delete rt-mingrui-wang-2
pass check
length of URL(header and body)
length >= Max.Length
this scenario will not happen, cuz every param's length is limited
length < Max.Length
【status_code = 200】
pass check
response struct
Response data keep same with definition
Successful Response【status_code=200】
Bad request【status_code = 400】
Invalid token【status_code = 401】
Not authenticated【status_code = 403】
Not Found【status_code=404】
Method Not Allowed【status_code = 405】
Validation Error【status_code=422】
Logic check
0 条评论
下一页