Commit 7a09b152 7a09b152a27408a9b10084bc1b22f8a048a1e07c by chenjing

更新代码

1 parent 325a2110
......@@ -82,6 +82,7 @@ def run_api_test(cases):
if not should_run_in_env(env_scope, current_env):
print(f"⏭️ 跳过用例 case_id: {case.get('case_id')},原因:不在{current_env}环境执行范围内 (env_scope: {env_scope})")
continue
# 变量替换,优先用ip_host+path拼接url
ip_host = replace_vars(case.get('ip_host', ''), env_vars)
path = replace_vars(case.get('path', ''), env_vars)
......@@ -98,7 +99,6 @@ def run_api_test(cases):
method = case.get('method', '').upper()
params_str = replace_vars(case.get('params', ''), env_vars)
headers_str = replace_vars(case.get('headers', ''), env_vars)
print(f"case_id: {case.get('case_id')}, headers_str: {headers_str}, env_vars: {env_vars}")
expected_code = int(case.get('expected_code', 0) or 0)
expected_msg = case.get('expected_msg', '') if 'expected_msg' in case else ''
expected_response = replace_vars(case.get('expected_response', ''), env_vars)
......