mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
print warning message when no testcase found
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
__title__ = 'HttpRunner'
|
||||
__description__ = 'One-stop solution for HTTP(S) testing.'
|
||||
__url__ = 'https://github.com/HttpRunner/HttpRunner'
|
||||
__version__ = '1.2.0-beta'
|
||||
__version__ = '1.2.1-beta'
|
||||
__author__ = 'debugtalk'
|
||||
__author_email__ = 'mail@debugtalk.com'
|
||||
__license__ = 'MIT'
|
||||
|
||||
@@ -215,6 +215,7 @@ class HttpRunner(object):
|
||||
mapping = mapping or {}
|
||||
task_suite = TaskSuite(self.path, mapping)
|
||||
except exception.TestcaseNotFound:
|
||||
logger.log_error("Testcases not found in {}".format(self.path))
|
||||
sys.exit(1)
|
||||
|
||||
result = self.runner.run(task_suite)
|
||||
|
||||
@@ -485,6 +485,9 @@ def load_test_file(file_path):
|
||||
api_info.update(item["api"])
|
||||
testset["api"][func_name] = api_info
|
||||
|
||||
else:
|
||||
logger.log_warning("unexpected block: {}. block should only be config or test.".format(key))
|
||||
|
||||
return testset
|
||||
|
||||
def get_testinfo_by_reference(ref_name, ref_type):
|
||||
|
||||
Reference in New Issue
Block a user