feat: convert YAML/JSON testcase to python testcase

This commit is contained in:
debugtalk
2020-05-14 16:46:52 +08:00
parent 1c97e0bbfe
commit ba0611a09a
4 changed files with 267 additions and 80 deletions

11
httprunner/loader_test.py Normal file
View File

@@ -0,0 +1,11 @@
import unittest
from httprunner.new_loader import load_testcase_file
class TestLoader(unittest.TestCase):
def test_load_testcase_file(self):
path = "examples/postman_echo/request_methods/request_with_variables.yml"
testcase = load_testcase_file(path)
self.assertEqual(testcase.config.name, "request methods testcase with variables")
self.assertEqual(len(testcase.teststeps), 3)