mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-09 06:23:52 +08:00
feat: save variables and export data to JSON files when specified --save-tests
This commit is contained in:
@@ -1,6 +1,12 @@
|
|||||||
# Release History
|
# Release History
|
||||||
|
|
||||||
## 2.5.5 (2020-01-06)
|
## 2.5.5 (2020-02-05)
|
||||||
|
|
||||||
|
**Added**
|
||||||
|
|
||||||
|
- feat: save variables and export data to JSON files when specified `--save-tests`
|
||||||
|
|
||||||
|
## 2.5.4 (2020-01-06)
|
||||||
|
|
||||||
**Fixed**
|
**Fixed**
|
||||||
|
|
||||||
|
|||||||
@@ -221,6 +221,9 @@ class HttpRunner(object):
|
|||||||
|
|
||||||
if self.save_tests:
|
if self.save_tests:
|
||||||
utils.dump_logs(self._summary, project_mapping, "summary")
|
utils.dump_logs(self._summary, project_mapping, "summary")
|
||||||
|
# save variables and export data
|
||||||
|
vars_out = self.get_vars_out()
|
||||||
|
utils.dump_logs(vars_out, project_mapping, "vars_out")
|
||||||
|
|
||||||
return self._summary
|
return self._summary
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ def main():
|
|||||||
help="Specify report file path, this has higher priority than specifying report dir.")
|
help="Specify report file path, this has higher priority than specifying report dir.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--save-tests', action='store_true', default=False,
|
'--save-tests', action='store_true', default=False,
|
||||||
help="Save loaded/parsed/summary json data to JSON files.")
|
help="Save loaded/parsed/vars_out/summary json data to JSON files.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--failfast', action='store_true', default=False,
|
'--failfast', action='store_true', default=False,
|
||||||
help="Stop the test run on the first error or failure.")
|
help="Stop the test run on the first error or failure.")
|
||||||
|
|||||||
Reference in New Issue
Block a user