mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
add load_testsuites_folder
This commit is contained in:
@@ -473,7 +473,7 @@ class TestSuiteLoader(unittest.TestCase):
|
||||
|
||||
def test_load_testcases_folder(self):
|
||||
path = os.path.join(os.getcwd(), "tests", "suite")
|
||||
testcases_definition_mapping = loader.load_testcases_folder(path)
|
||||
testcases_definition_mapping = loader.load_test_folder(path)
|
||||
|
||||
self.assertIn("setup_and_reset", testcases_definition_mapping)
|
||||
self.assertIn("create_and_check", testcases_definition_mapping)
|
||||
@@ -481,3 +481,17 @@ class TestSuiteLoader(unittest.TestCase):
|
||||
testcases_definition_mapping["setup_and_reset"]["config"]["name"],
|
||||
"setup and reset all."
|
||||
)
|
||||
|
||||
def test_load_testsuites_folder(self):
|
||||
path = os.path.join(os.getcwd(), "tests", "testcases")
|
||||
testsuites_definition_mapping = loader.load_test_folder(path)
|
||||
|
||||
testsute_path = os.path.join(os.getcwd(), "tests", "testcases", "smoketest.yml")
|
||||
self.assertIn(
|
||||
testsute_path,
|
||||
testsuites_definition_mapping
|
||||
)
|
||||
self.assertEqual(
|
||||
testsuites_definition_mapping[testsute_path]["config"]["name"],
|
||||
"smoketest"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user