Added simple HTML reporting
Simple HTML reporting for executed tests
Added the simple HTML reporting for the executed tests:
firstly the text result tables are saved to the CSV files,
and then they are converted to a single HTML report.
The generation of the report is using “pandas” and “jinja2"
modules. The CSS styles are using Mirantis style guides.
The Jijna template and the CSS styles are stored in the
‘templates/’ folder.
The ‘glance_speed_test’ output is improved and is using
a similar text table as the other tests.
At the end of each test case, the results are saved to
a new CSV file named after the test case in the ‘reports/’
folder. If the test is rerun, the new CSV is created
instead of the old one. In the end of the execution of
the tests, a single HTML report is created from all CSV
files in the ‘reports/’ folder.
Related-PROD: PROD-36943
Change-Id: Iceff8b168364219a01b60546bb9908e01d61c434
diff --git a/fixtures/base.py b/fixtures/base.py
index ed00d80..fb4fb43 100644
--- a/fixtures/base.py
+++ b/fixtures/base.py
@@ -5,6 +5,7 @@
import time
import logging
+from utils import helpers
from utils import os_client
@@ -211,3 +212,9 @@
else:
logger.info("Project {} is not empty, skip deleting".format(
alt_project.name))
+
+
+@pytest.fixture(scope="session")
+def html_report():
+ yield
+ helpers.convert_csvs_to_single_html_report()