mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-30 12:59:39 +08:00
change variable marker and function marker:
1, variable marker: ${var} => $var;
2, function marker: {'func': 'gen_random_string', 'args': [5]} => ${gen_random_string(5).
This commit is contained in:
@@ -26,7 +26,7 @@ class Runner(object):
|
||||
"import_module_functions": ["test.data.custom_functions"],
|
||||
"variable_binds": [
|
||||
{"TOKEN": "debugtalk"},
|
||||
{"random": {"func": "gen_random_string", "args": [5]}},
|
||||
{"random": "${gen_random_string(5)}"},
|
||||
]
|
||||
}
|
||||
@param (str) context level, testcase or testset
|
||||
@@ -62,8 +62,8 @@ class Runner(object):
|
||||
"method": "POST",
|
||||
"headers": {
|
||||
"Content-Type": "application/json",
|
||||
"authorization": "${authorization}",
|
||||
"random": "${random}"
|
||||
"authorization": "$authorization",
|
||||
"random": "$random"
|
||||
},
|
||||
"body": '{"name": "user", "password": "123456"}'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user