mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
new mapping style:
"variables": {
"a": 1,
"b": 2
}
Also, the former list style is still valid:
"variables": [
{"a": 1},
{"b": 2}
]
24 lines
551 B
YAML
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}
|