refactor testcase layer

This commit is contained in:
debugtalk
2018-05-02 16:29:35 +08:00
parent 915294ebd3
commit 4b9cc0a9bd
20 changed files with 505 additions and 937 deletions

View File

@@ -6,8 +6,7 @@ import os
import sys
from httprunner.logger import color_print
from httprunner.testcase import load_test_file
from httprunner.testcase import TestcaseLoader
from locust.main import main
@@ -41,7 +40,7 @@ def gen_locustfile(testcase_file_path):
"templates",
"locustfile_template"
)
testset = load_test_file(testcase_file_path)
testset = TestcaseLoader.load_test_file(testcase_file_path)
host = testset.get("config", {}).get("request", {}).get("base_url", "")
with io.open(template_path, encoding='utf-8') as template: