diff --git a/haf/common/database.py b/haf/common/database.py
index 17fb4cf..b2d911f 100644
--- a/haf/common/database.py
+++ b/haf/common/database.py
@@ -143,11 +143,11 @@ def connect_execute(self, sqlconfig: SQLConfig, sqlscript: list, **kwargs)-> tup
if commit:
self.connect_msql.commit()
logger.debug(data, __name__)
+ self.close()
return data
except Exception as e:
logger.error(str(e), __name__)
- if self.connect_msql.open:
- self.connect_msql.close()
+ self.close()
return []
def close(self):
@@ -156,7 +156,8 @@ def close(self):
if self.connect_msql is not None:
self.connect_msql.close()
except Exception as e:
- logger.error(e, __name__)
+ # logger.error(e, __name__)
+ pass
class SqlServerTool(object):
diff --git a/haf/common/httprequest.py b/haf/common/httprequest.py
index ab6c596..d01fb4f 100644
--- a/haf/common/httprequest.py
+++ b/haf/common/httprequest.py
@@ -82,7 +82,7 @@ def get(url, data=None, headers=None, **kwargs):
else:
data = None
- logger.info(f'{key} GET [url] {url}', __name__)
+ logger.debug(f'{key} GET [url] {url}', __name__)
# using requests to Request the url with headers and method get
request = ur.Request(url=url, data=data, headers=headers)
@@ -94,16 +94,16 @@ def get(url, data=None, headers=None, **kwargs):
if response is None:
return {"result": "None"}
else:
- logger.info(f"{key} {str(response)}", __name__)
+ logger.debug(f"{key} {str(response)}", __name__)
return response
except ur.URLError as e:
- logger.info(f"{key}{str(e)}", __name__)
- logger.info(f"{key}{traceback.format_exc()}", __name__)
+ logger.error(f"{key}{str(e)}", __name__)
+ logger.error(f"{key}{traceback.format_exc()}", __name__)
return e
except Exception as ee:
- logger.info(f"{key}{str(ee)}")
- logger.info(f"{key}{traceback.format_exc()}", __name__)
+ logger.error(f"{key}{str(ee)}")
+ logger.error(f"{key}{traceback.format_exc()}", __name__)
return ee
@staticmethod
@@ -130,7 +130,7 @@ def post(url, data=None, headers=None, **kwargs):
if response is None:
return {"result": "None"}
else:
- logger.info(f"{key} POST {str(response)}", __name__)
+ logger.debug(f"{key} POST {str(response)}", __name__)
return response
except ur.URLError as e:
diff --git a/haf/config.py b/haf/config.py
index f944ac8..d5317da 100644
--- a/haf/config.py
+++ b/haf/config.py
@@ -144,7 +144,7 @@
# version define
MAIN_VERSION = 2
SUB_VERSION = 9
-FIX_VERSION = 3
+FIX_VERSION = 5
VERSION_TYPE = "haf"
PLATFORM_VERSION = f"{VERSION_TYPE}-{MAIN_VERSION}.{SUB_VERSION}.{FIX_VERSION}"
diff --git a/haf/ext/resource/report/base.html b/haf/ext/resource/report/base.html
index b9b2f68..0ecb625 100644
--- a/haf/ext/resource/report/base.html
+++ b/haf/ext/resource/report/base.html
@@ -4,11 +4,26 @@
{% block head %}
-
+
+
+
+
+
+
-
- {% block all_pass %}
-
-
+
+ {% block all_pass %}
-
+ {% endblock %}
-
- {% endblock %}
-
-
- {% block all_fail %}
-
-
+
+ {% block all_fail %}
-
+ {% endblock %}
-
- {% endblock %}
-
-
- {% block all_skip %}
-
-
+
+ {% block all_skip %}
-
+ {% endblock %}
-
- {% endblock %}
-
-
- {% block all_error %}
-
-
+
+ {% block all_error %}
-
-
+
-
+
+
- Suite |
- Case Id |
- Params |
+ Suite - Case Id |
Request |
Response |
+ Sql |
Check |
- Time |
- DependenceCase |
- Runner |
+ Others |
Result |
-
-
- {% for suite in results.details.keys() %}
- {% for case in results.details.get(suite).cases %}
- {% set infos = ["success","danger", "", "warning"] %}
- {% set id='{}.{}.{}.{}.all-error'.format(case.case.bench_name, case.case.ids.id, case.case.ids.subid, case.case.ids.name) %}
- {% set id_temp = '{}.{}.{}'.format(case.case.ids.id, case.case.ids.subid, case.case.ids.name) %}
- {% set method_group = {30: "GET", 31: "POST", 32: "PUT", 33: "DELETE"} %}
- {% if case.result == 53 %}
-
- {{suite}} |
- {{id_temp}} |
-
- Params
-
- -
-
{{case.case.param}}
-
-
+
+ |
+ {% for suite_summary in results.summary.keys() %}
+
+ {{suite_summary}} |
+ {{results.summary.get(suite_summary).base_url}} |
+ {{results.summary.get(suite_summary).begin_time}} |
+ {{results.summary.get(suite_summary).end_time}} |
+ {{results.summary.get(suite_summary).duration}} |
+ {{results.summary.get(suite_summary).passed}}
|
-
- url : {{case.case.request.url}}
- all
-
+ | {{results.summary.get(suite_summary).failed}}
|
-
- {% set response=case.case.response.deserialize() %}
- code : {{response.get("code")}}
- all
-
+ | {{results.summary.get(suite_summary).error}}
|
-
- {% set check1=case.result_check_response %}
- response check
-
- {% set check2=case.result_check_sql_response %}
- sql check
-
- - result:{{check2}}
- {% if case.case.sql_check_func != "" %}
- - check func: {{case.case.expect.sql_check_func}}
- {% endif %}
-
-
- run error
-
+ | {{results.summary.get(suite_summary).skip}}
|
-
-
- - {{"begin {}".format(case.begin_time)}}
- - {{"end {}".format(case.end_time)}}
- - {{"duration {}".format(case.duration)}}
-
- |
-
-
- {% for dep in case.case.dependent %}
- - {{dep}}
- {% endfor %}
-
+ | {{results.summary.get(suite_summary).all}}
|
- {{case.runner}} |
- {% set result_group = ["PASS","FAIL","SKIP","ERROR" ] %}
- {{result_group[case.result-50]}} |
- {% endif %}
- {% endfor %}
{% endfor %}
-
-
+
-
- {% endblock %}
-
-
-
-
-
- {% block suites %}
- {% for suite in results.details.keys() %}
-
-
-
+
+ {% block suites %}
+ {% for suite in results.details.keys() %}
+
+
+
+
+ {% endfor %}
+ {% endblock %}
- {% endfor %}
- {% endblock %}
-