fix starts_with and ends_wih spelling

Change-Id: I1e475e8187f6e793cd9f9029af93a7d80603b26d
This commit is contained in:
buyuxiang
2022-02-14 14:41:15 +08:00
parent 5c03e0d325
commit 5bce59c583
13 changed files with 278 additions and 22 deletions

View File

@@ -48,7 +48,7 @@
},
{
"check": "headers.\"Content-Type\"",
"assert": "startswith",
"assert": "starts_with",
"expect": "application/json"
},
{

View File

@@ -33,7 +33,7 @@ teststeps:
expect: 200
msg: check response status code
- check: headers."Content-Type"
assert: startswith
assert: starts_with
expect: application/json
- check: body.args.foo1
assert: length_equals

View File

@@ -10,21 +10,70 @@
"method": "GET",
"url": "/get",
"params": {
"a": 1
"a": 1,
"foo": "I'm a happy guy"
}
},
"validate": [
{
"check": "body.args.a",
"assert": "eq",
"expect": "1",
"msg": "check argument a"
},
{
"check": "status_code",
"assert": "greater_than",
"assert": "lt",
"expect": 201,
"msg": "check status code"
},
{
"check": "status_code",
"assert": "gt",
"expect": 199,
"msg": "check status code"
},
{
"check": "body.args.a",
"assert": "equal",
"expect": "1",
"msg": "check argument a"
"check": "status_code",
"assert": "ge",
"expect": 200,
"msg": "check status code"
},
{
"check": "status_code",
"assert": "le",
"expect": 200,
"msg": "check status code"
},
{
"check": "status_code",
"assert": "ne",
"expect": 199,
"msg": "check status code"
},
{
"check": "body.args.foo",
"assert": "contains",
"expect": "happy",
"msg": "check status code"
},
{
"check": "body.args.foo",
"assert": "type_match",
"expect": "string",
"msg": "check status code"
},
{
"check": "body.args.foo",
"assert": "starts_with",
"expect": "I'm",
"msg": "check status code"
},
{
"check": "body.args.foo",
"assert": "type_match",
"expect": "string",
"msg": "check status code"
}
]
}