Files
httprunner/tests/data/demo_testcase.yml
debugtalk 2ec2d3c2d8 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}
]
2018-11-28 12:14:06 +08:00

24 lines
551 B
YAML

- config:
name: "123$var_a"
variables:
var_a: 0
var_c: "${sum_two(1, 2)}"
PROJECT_KEY: ${ENV(PROJECT_KEY)}
# parameters:
# - "var_a-var_b":
# - [11, 21]
# - [12, 22]
# - "app_version": "${gen_app_version()}"
- test:
name: testcase1-$var_a
request:
url: /api1
method: GET
headers:
var_a: $var_a
var_b: $var_b
var_c: $var_c
validate:
- {"check": "status_code", "comparator": "eq", "expect": 200}