From 97e884de616e714c7dd1adfc9dc40de6410e3e6f Mon Sep 17 00:00:00 2001 From: debugtalk Date: Fri, 20 Jul 2018 11:06:34 +0800 Subject: [PATCH] display parameters and output in report --- httprunner/__about__.py | 2 +- httprunner/task.py | 5 +++- .../templates/default_report_template.html | 29 +++++++++++++++++-- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/httprunner/__about__.py b/httprunner/__about__.py index 80ebd1fb..792bf03a 100644 --- a/httprunner/__about__.py +++ b/httprunner/__about__.py @@ -1,7 +1,7 @@ __title__ = 'HttpRunner' __description__ = 'One-stop solution for HTTP(S) testing.' __url__ = 'https://github.com/HttpRunner/HttpRunner' -__version__ = '1.5.1' +__version__ = '1.5.2' __author__ = 'debugtalk' __author_email__ = 'mail@debugtalk.com' __license__ = 'MIT' diff --git a/httprunner/task.py b/httprunner/task.py index 62bce835..965132c9 100644 --- a/httprunner/task.py +++ b/httprunner/task.py @@ -151,7 +151,10 @@ class TestSuite(unittest.TestSuite): if not out: continue - in_out = {"in": variables, "out": out} + in_out = { + "in": variables or {}, + "out": out + } if in_out not in outputs: outputs.append(in_out) diff --git a/httprunner/templates/default_report_template.html b/httprunner/templates/default_report_template.html index a2ddcd22..e72587b0 100644 --- a/httprunner/templates/default_report_template.html +++ b/httprunner/templates/default_report_template.html @@ -187,10 +187,35 @@ {% for test_suite_summary in details %} {% set suite_index = loop.index %}

{{test_suite_summary.name}}

- +
- + +
base_url{{test_suite_summary.base_url}}{{test_suite_summary.base_url}} + parameters & output +
+ +
+
TOTAL: {{test_suite_summary.stat.testsRun}}