fix #139: hooks execution order

This commit is contained in:
httprunner
2018-04-24 16:59:52 +08:00
parent e263021c3b
commit 99d66db9b2
4 changed files with 38 additions and 4 deletions

View File

@@ -75,6 +75,13 @@ class TestRunner(ApiServerUnittest):
# check if teardown function executed
self.assertGreater(end_time - start_time, 2)
def test_run_testset_with_setup_hooks(self):
testcase_file_path = os.path.join(
os.getcwd(), 'tests/httpbin/hooks.yml')
runner = HttpRunner().run(testcase_file_path)
summary = runner.summary
self.assertTrue(summary["success"])
def test_run_testset_hardcode(self):
for testcase_file_path in self.testcase_file_path_list:
runner = HttpRunner().run(testcase_file_path)