From 8b596b21776e7c89ceeca29b65b2c100d9cac1c0 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Thu, 12 Dec 2019 15:47:51 +0800 Subject: [PATCH] fix: dump json file name is empty when running relative testfile --- docs/CHANGELOG.md | 1 + httprunner/loader/buildup.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 00ac1fe1..a2ccfe53 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -11,6 +11,7 @@ - fix: typo testfile_paths - fix: check if locustio installed +- fix: dump json file name is empty when running relative testfile ## 2.4.0 (2019-12-11) diff --git a/httprunner/loader/buildup.py b/httprunner/loader/buildup.py index b2e9a16d..deb3352a 100644 --- a/httprunner/loader/buildup.py +++ b/httprunner/loader/buildup.py @@ -480,11 +480,10 @@ def load_project_data(test_path, dot_env_path=None): debugtalk_functions = {} # locate PWD and load debugtalk.py functions - project_mapping["PWD"] = project_working_directory functions.PWD = project_working_directory # TODO: remove project_mapping["functions"] = debugtalk_functions - project_mapping["test_path"] = test_path + project_mapping["test_path"] = os.path.abspath(test_path) # load api tests_def_mapping["api"] = load_api_folder(os.path.join(project_working_directory, "api"))