mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-30 21:09:36 +08:00
refactor context:
1, testset and testcase are in different context level; 2, testset context will be initialized when a file is loaded, and testcase level context initializes when each testcase starts; 3, testcase context should inherit from testset context configs, and the testcase context has high priority.
This commit is contained in:
@@ -26,7 +26,7 @@ def create_suite(testset):
|
||||
|
||||
test_runner = runner.TestRunner()
|
||||
config_dict = testset.get("config", {})
|
||||
test_runner.update_context(config_dict, level="testset")
|
||||
test_runner.init_context(config_dict, level="testset")
|
||||
testcases = testset.get("testcases", [])
|
||||
|
||||
for testcase in testcases:
|
||||
|
||||
Reference in New Issue
Block a user