mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
81 lines
2.5 KiB
JSON
81 lines
2.5 KiB
JSON
{
|
|
"config": {
|
|
"name": "request methods testcase: validate with parameters",
|
|
"base_url": "https://httpbingo.bytedance.net"
|
|
},
|
|
"teststeps": [
|
|
{
|
|
"name": "get with params",
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "/get",
|
|
"params": {
|
|
"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": "lt",
|
|
"expect": 201,
|
|
"msg": "check status code"
|
|
},
|
|
{
|
|
"check": "status_code",
|
|
"assert": "gt",
|
|
"expect": 199,
|
|
"msg": "check status code"
|
|
},
|
|
{
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |