mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
fix: unittest
This commit is contained in:
@@ -8,16 +8,14 @@
|
||||
"app_version": "2.8.6"
|
||||
},
|
||||
"base_url": "https://postman-echo.com",
|
||||
"herader": [
|
||||
{
|
||||
"Accept": "*/*",
|
||||
"Accept-Encoding": "gzip, deflate, br",
|
||||
"Cache-Control": "no-cache",
|
||||
"Connection": "keep-alive",
|
||||
"Host": "postman-echo.com",
|
||||
"User-Agent": "PostmanRuntime/7.28.4"
|
||||
}
|
||||
],
|
||||
"headers": {
|
||||
"Accept": "*/*",
|
||||
"Accept-Encoding": "gzip, deflate, br",
|
||||
"Cache-Control": "no-cache",
|
||||
"Connection": "keep-alive",
|
||||
"Host": "postman-echo.com",
|
||||
"User-Agent": "PostmanRuntime/7.28.4"
|
||||
},
|
||||
"verify": false,
|
||||
"export": [
|
||||
"session_token"
|
||||
@@ -48,16 +46,16 @@
|
||||
},
|
||||
"validate": [
|
||||
{
|
||||
"eq": [
|
||||
"status_code",
|
||||
200
|
||||
]
|
||||
"check": "status_code",
|
||||
"assert": "equal",
|
||||
"expect": 200,
|
||||
"msg": "check status_code"
|
||||
},
|
||||
{
|
||||
"eq": [
|
||||
"body.headers.postman-token",
|
||||
"ea19464c-ddd4-4724-abe9-5e2b254c2723"
|
||||
]
|
||||
"check": "body.headers.postman-token",
|
||||
"assert": "equal",
|
||||
"expect": "ea19464c-ddd4-4724-abe9-5e2b254c2723",
|
||||
"msg": "check body.headers.postman-token"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -26,7 +26,7 @@ teststeps:
|
||||
headers:
|
||||
User-Agent: funplugin/${get_version()}
|
||||
Content-Type: "application/x-www-form-urlencoded"
|
||||
data: "foo1=$foo1&foo2=$foo3"
|
||||
body: "foo1=$foo1&foo2=$foo3"
|
||||
validate:
|
||||
- check: status_code
|
||||
assert: equal
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
"User-Agent": "funplugin/${get_version()}",
|
||||
"Content-Type": "text/plain"
|
||||
},
|
||||
"data": "This is expected to be sent back as part of response body: $foo1-$foo2-$foo3."
|
||||
"body": "This is expected to be sent back as part of response body: $foo1-$foo2-$foo3."
|
||||
},
|
||||
"validate": [
|
||||
{
|
||||
@@ -105,7 +105,7 @@
|
||||
"User-Agent": "funplugin/${get_version()}",
|
||||
"Content-Type": "application/x-www-form-urlencoded"
|
||||
},
|
||||
"data": "foo1=$foo1&foo2=$foo2&foo3=$foo3"
|
||||
"body": "foo1=$foo1&foo2=$foo2&foo3=$foo3"
|
||||
},
|
||||
"validate": [
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ teststeps:
|
||||
headers:
|
||||
User-Agent: funplugin/${get_version()}
|
||||
Content-Type: "text/plain"
|
||||
data: "This is expected to be sent back as part of response body: $foo1-$foo2-$foo3."
|
||||
body: "This is expected to be sent back as part of response body: $foo1-$foo2-$foo3."
|
||||
validate:
|
||||
- check: status_code
|
||||
assert: equal
|
||||
@@ -74,7 +74,7 @@ teststeps:
|
||||
headers:
|
||||
User-Agent: funplugin/${get_version()}
|
||||
Content-Type: "application/x-www-form-urlencoded"
|
||||
data: "foo1=$foo1&foo2=$foo2&foo3=$foo3"
|
||||
body: "foo1=$foo1&foo2=$foo2&foo3=$foo3"
|
||||
validate:
|
||||
- check: status_code
|
||||
assert: equal
|
||||
|
||||
Reference in New Issue
Block a user