bugfix verify priority: teststep > config

This commit is contained in:
debugtalk
2019-02-24 18:48:03 +08:00
parent d0308bbf51
commit 73dcded823
2 changed files with 79 additions and 3 deletions

View File

@@ -794,9 +794,12 @@ def __parse_testcase_tests(tests, config, project_mapping):
variables priority:
testcase config > testcase test > testcase_def config > testcase_def test > api
base_url/verify priority:
base_url priority:
testcase test > testcase config > testsuite test > testsuite config > api
verify priority:
testcase teststep (api) > testcase config > testsuite config
Args:
tests (list):
config (dict):
@@ -814,8 +817,6 @@ def __parse_testcase_tests(tests, config, project_mapping):
if (not test_dict.get("base_url")) and config_base_url:
test_dict["base_url"] = config_base_url
test_dict.setdefault("verify", config_verify)
# 1, testcase config => testcase tests
# override test_dict variables
test_dict["variables"] = utils.extend_variables(
@@ -875,6 +876,10 @@ def __parse_testcase_tests(tests, config, project_mapping):
request_url
)
# verify priority: testcase teststep > testcase config
if "request" in test_dict and "verify" not in test_dict["request"]:
test_dict["request"]["verify"] = config_verify
def _parse_testcase(testcase, project_mapping):
""" parse testcase