mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-12 16:01:27 +08:00
change: rename schema model name and class name
This commit is contained in:
@@ -9,26 +9,27 @@ from httprunner.new_loader import load_testcase_file, load_folder_files
|
||||
__TMPL__ = """# NOTICE: Generated By HttpRunner. DO'NOT EDIT!
|
||||
import unittest
|
||||
|
||||
from httprunner.runner import TestCaseRunner
|
||||
from httprunner.schema import TestsConfig, TestStep
|
||||
from httprunner.runner import HttpRunner
|
||||
from httprunner.schema import TConfig, TStep
|
||||
|
||||
|
||||
class {{ class_name }}(unittest.TestCase):
|
||||
config = TestsConfig(**{{ config }})
|
||||
config = TConfig(**{{ config }})
|
||||
|
||||
teststeps = [
|
||||
{% for teststep in teststeps %}
|
||||
TestStep(**{{ teststep }}),
|
||||
TStep(**{{ teststep }}),
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
def test_start(self):
|
||||
TestCaseRunner(self.config, self.teststeps).run()
|
||||
HttpRunner(self.config, self.teststeps).run()
|
||||
|
||||
"""
|
||||
|
||||
|
||||
def make_testcase(testcase_path: str) -> str:
|
||||
logger.info(f"start to make testcase: {testcase_path}")
|
||||
testcase, _ = load_testcase_file(testcase_path)
|
||||
template = jinja2.Template(__TMPL__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user