make variables in testcase template compatible with mapping style:

new mapping style:
"variables": {
    "a": 1,
    "b": 2
}

Also, the former list style is still valid:
"variables": [
    {"a": 1},
    {"b": 2}
]
This commit is contained in:
httprunner
2018-11-28 12:11:50 +08:00
parent a4ce29e656
commit 9a62f778fb
20 changed files with 141 additions and 142 deletions

View File

@@ -1,10 +1,10 @@
bind_variables:
variables:
- TOKEN: "debugtalk"
- token: $TOKEN
TOKEN: "debugtalk"
token: $TOKEN
builtin_functions:
variables:
- length: ${len(debugtalk)}
- smallest: ${min(2, 3, 8)}
- largest: ${max(2, 3, 8)}
length: ${len(debugtalk)}
smallest: ${min(2, 3, 8)}
largest: ${max(2, 3, 8)}