mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 15:37:35 +08:00
fix: catch ApiNotFound exception when loading testcases
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
- fix: display validators in report when validate raised exception
|
- fix: display validators in report when validate raised exception
|
||||||
- fix: eval validator python script before validating
|
- fix: eval validator python script before validating
|
||||||
- fix: do not strip string content when preparing lazy data
|
- fix: do not strip string content when preparing lazy data
|
||||||
|
- fix: catch ApiNotFound exception when loading testcases
|
||||||
|
|
||||||
## 2.4.8 (2019-12-25)
|
## 2.4.8 (2019-12-25)
|
||||||
|
|
||||||
|
|||||||
@@ -480,6 +480,8 @@ def load_cases(path, dot_env_path=None):
|
|||||||
loaded_content = None
|
loaded_content = None
|
||||||
try:
|
try:
|
||||||
loaded_content = load_test_file(path)
|
loaded_content = load_test_file(path)
|
||||||
|
except exceptions.ApiNotFound as ex:
|
||||||
|
logger.log_warning("Invalid api reference in {}: {}".format(path, ex))
|
||||||
except exceptions.FileFormatError:
|
except exceptions.FileFormatError:
|
||||||
logger.log_warning("Invalid test file format: {}".format(path))
|
logger.log_warning("Invalid test file format: {}".format(path))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user