mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
Merge branch 'main' of github.com:httprunner/hrp
Change-Id: I5075829627ac2775050b799c471eec1868542e15
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# Release History
|
||||
|
||||
## v0.6.2 (2022-02-20)
|
||||
- fix: omit pseudo header names for HTTP/1, e.g. :authority
|
||||
- fix: generate `headers.\"Content-Type\"` in har2case
|
||||
- change: json unmarshal to json.Number when parsing data
|
||||
- fix: incorrect data type when extracting data using jmespath
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -75,7 +75,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -129,7 +129,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -177,7 +177,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -231,7 +231,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -285,7 +285,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -337,7 +337,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -374,7 +374,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -420,7 +420,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -460,7 +460,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -500,7 +500,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -540,7 +540,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -589,7 +589,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "text/plain; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -625,7 +625,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -660,7 +660,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -699,7 +699,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "text/plain; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -733,7 +733,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -766,7 +766,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -832,7 +832,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -871,7 +871,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "text/html; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -904,7 +904,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -949,7 +949,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -994,7 +994,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -1033,7 +1033,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "text/html; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -1069,7 +1069,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -1112,7 +1112,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -1155,7 +1155,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -1198,7 +1198,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -1241,7 +1241,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -1284,7 +1284,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -1326,7 +1326,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -1405,7 +1405,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -1448,7 +1448,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -1492,7 +1492,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
@@ -1534,7 +1534,7 @@
|
||||
"msg": "assert response status code"
|
||||
},
|
||||
{
|
||||
"check": "headers.Content-Type",
|
||||
"check": "headers.\"Content-Type\"",
|
||||
"assert": "equals",
|
||||
"expect": "application/json; charset=utf-8",
|
||||
"msg": "assert response header Content-Type"
|
||||
|
||||
@@ -23,7 +23,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -53,7 +53,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -91,7 +91,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -125,7 +125,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -163,7 +163,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -201,7 +201,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -237,7 +237,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -263,7 +263,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -295,7 +295,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -323,7 +323,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -351,7 +351,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -379,7 +379,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -413,7 +413,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 302
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: text/plain; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -439,7 +439,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -464,7 +464,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -492,7 +492,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 302
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: text/plain; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -516,7 +516,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -539,7 +539,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -585,7 +585,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -612,7 +612,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: text/html; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -635,7 +635,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -666,7 +666,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -697,7 +697,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -724,7 +724,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: text/html; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -749,7 +749,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -779,7 +779,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -809,7 +809,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -839,7 +839,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -869,7 +869,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -899,7 +899,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -928,7 +928,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -982,7 +982,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -1012,7 +1012,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -1043,7 +1043,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
@@ -1072,7 +1072,7 @@ teststeps:
|
||||
assert: equals
|
||||
expect: 200
|
||||
msg: assert response status code
|
||||
- check: headers.Content-Type
|
||||
- check: headers."Content-Type"
|
||||
assert: equals
|
||||
expect: application/json; charset=utf-8
|
||||
msg: assert response header Content-Type
|
||||
|
||||
@@ -267,7 +267,7 @@ func (s *tStep) makeValidate(entry *Entry) error {
|
||||
// assert Content-Type
|
||||
if strings.EqualFold(header.Name, "Content-Type") {
|
||||
s.Validators = append(s.Validators, hrp.Validator{
|
||||
Check: "headers.Content-Type",
|
||||
Check: "headers.\"Content-Type\"",
|
||||
Assert: "equals",
|
||||
Expect: header.Value,
|
||||
Message: "assert response header Content-Type",
|
||||
|
||||
@@ -101,7 +101,7 @@ func TestMakeTestCase(t *testing.T) {
|
||||
if !assert.Equal(t, "status_code", tCase.TestSteps[0].Validators[0].Check) {
|
||||
t.Fail()
|
||||
}
|
||||
if !assert.Equal(t, "headers.Content-Type", tCase.TestSteps[0].Validators[1].Check) {
|
||||
if !assert.Equal(t, "headers.\"Content-Type\"", tCase.TestSteps[0].Validators[1].Check) {
|
||||
t.Fail()
|
||||
}
|
||||
if !assert.Equal(t, "body.url", tCase.TestSteps[0].Validators[2].Check) {
|
||||
|
||||
18
runner.go
18
runner.go
@@ -636,12 +636,18 @@ func (r *caseRunner) runStepRequest(step *TStep) (stepResult *stepData, err erro
|
||||
return stepResult, errors.Wrap(err, "parse headers failed")
|
||||
}
|
||||
for key, value := range headers {
|
||||
// omit pseudo header names for HTTP/1, e.g. :authority, :method, :path, :scheme
|
||||
if strings.HasPrefix(key, ":") {
|
||||
continue
|
||||
}
|
||||
req.Header.Add(key, value)
|
||||
}
|
||||
}
|
||||
if length := req.Header.Get("Content-Length"); length != "" {
|
||||
if l, err := strconv.ParseInt(length, 10, 64); err == nil {
|
||||
req.ContentLength = l
|
||||
|
||||
// prepare content length
|
||||
if strings.EqualFold(key, "Content-Length") && value != "" {
|
||||
if l, err := strconv.ParseInt(value, 10, 64); err == nil {
|
||||
req.ContentLength = l
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -703,7 +709,7 @@ func (r *caseRunner) runStepRequest(step *TStep) (stepResult *stepData, err erro
|
||||
if err != nil {
|
||||
return stepResult, err
|
||||
}
|
||||
if req.Header.Get("Content-Type") == "" {
|
||||
if contentType == "" {
|
||||
req.Header.Set("Content-Type", "application/json; charset=utf-8")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user