mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
change: generate reports folder in current working directory
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
- remove support for Python 2.7
|
||||
- replace string format with f-string
|
||||
- remove dependency colorama and colorlog
|
||||
- generate reports folder in current working directory
|
||||
|
||||
## 2.5.7 (2020-02-21)
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ class HttpRunner(object):
|
||||
self.test_loader = unittest.TestLoader()
|
||||
self.save_tests = save_tests
|
||||
self._summary = None
|
||||
self.project_working_directory = None
|
||||
|
||||
def _add_tests(self, testcases):
|
||||
""" initialize testcase with Runner() and add to test suite.
|
||||
@@ -194,7 +193,6 @@ class HttpRunner(object):
|
||||
"""
|
||||
capture_message("start to run tests")
|
||||
project_mapping = tests_mapping.get("project_mapping", {})
|
||||
self.project_working_directory = project_mapping.get("PWD", os.getcwd())
|
||||
|
||||
if self.save_tests:
|
||||
utils.dump_logs(tests_mapping, project_mapping, "loaded")
|
||||
|
||||
@@ -102,7 +102,7 @@ def main():
|
||||
try:
|
||||
for path in args.testfile_paths:
|
||||
summary = runner.run(path, dot_env_path=args.dot_env_path)
|
||||
report_dir = args.report_dir or os.path.join(runner.project_working_directory, "reports")
|
||||
report_dir = args.report_dir or os.path.join(os.getcwd(), "reports")
|
||||
gen_html_report(
|
||||
summary,
|
||||
report_template=args.report_template,
|
||||
|
||||
Reference in New Issue
Block a user