feat: convert YAML/JSON testcase to python testcase

This commit is contained in:
debugtalk
2020-05-14 16:46:52 +08:00
parent 9ba550bd9f
commit 202f040c1c
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)