change: replace template with config headers

This commit is contained in:
debugtalk
2022-05-28 09:52:22 +08:00
parent 52ce77efa8
commit 455a012c5d
15 changed files with 144 additions and 33 deletions

View File

@@ -7,6 +7,9 @@
"expect_foo1": "config_bar1",
"expect_foo2": "config_bar2"
},
"headers": {
"User-Agent": "funplugin/${get_version()}"
},
"base_url": "https://postman-echo.com",
"verify": false,
"export": [
@@ -28,9 +31,6 @@
"foo1": "$foo1",
"foo2": "$foo2",
"sum_v": "$sum_v"
},
"headers": {
"User-Agent": "funplugin/${get_version()}"
}
},
"extract": {
@@ -73,7 +73,6 @@
"method": "POST",
"url": "/post",
"headers": {
"User-Agent": "funplugin/${get_version()}",
"Content-Type": "text/plain"
},
"body": "This is expected to be sent back as part of response body: $foo1-$foo2-$foo3."
@@ -102,7 +101,6 @@
"method": "POST",
"url": "/post",
"headers": {
"User-Agent": "funplugin/${get_version()}",
"Content-Type": "application/x-www-form-urlencoded"
},
"body": "foo1=$foo1&foo2=$foo2&foo3=$foo3"

View File

@@ -5,6 +5,8 @@ config:
foo2: config_bar2
expect_foo1: config_bar1
expect_foo2: config_bar2
headers:
User-Agent: funplugin/${get_version()}
verify: False
export: ["foo3"]
@@ -22,8 +24,6 @@ teststeps:
foo1: $foo1
foo2: $foo2
sum_v: $sum_v
headers:
User-Agent: funplugin/${get_version()}
extract:
foo3: "body.args.foo2"
validate:
@@ -40,7 +40,6 @@ teststeps:
method: POST
url: $base_url/post
headers:
User-Agent: funplugin/${get_version()}
Content-Type: "text/plain"
body: "This is expected to be sent back as part of response body: $foo1-$foo2-$foo3."
validate:
@@ -54,7 +53,6 @@ teststeps:
method: POST
url: $base_url/post
headers:
User-Agent: funplugin/${get_version()}
Content-Type: "application/x-www-form-urlencoded"
body: "foo1=$foo1&foo2=$foo2&foo3=$foo3"
validate: