diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-09-14 16:16:46 +0200 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2016-09-14 17:51:14 +0200 |
commit | 909974639506803e066833ac826a0d93c74cad82 (patch) | |
tree | f0710c445deca70259d556c2a619bec2a9262f61 /utils/test/reporting/functest/reporting-status.py | |
parent | caab2d90b65086b87d909eb50c189cb732ab8be5 (diff) |
Add gauge metrics for Functest reporting dashboard
JIRA: FUNCTEST-476
Change-Id: Ia39ffa8b39a1085a081d6128871cee20436e051c
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'utils/test/reporting/functest/reporting-status.py')
-rwxr-xr-x | utils/test/reporting/functest/reporting-status.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/test/reporting/functest/reporting-status.py b/utils/test/reporting/functest/reporting-status.py index 0b80fe49a..ef567f17d 100755 --- a/utils/test/reporting/functest/reporting-status.py +++ b/utils/test/reporting/functest/reporting-status.py @@ -175,6 +175,8 @@ for version in conf.versions: scenario_criteria = conf.MAX_SCENARIO_CRITERIA s_score = str(scenario_score) + "/" + str(scenario_criteria) + s_score_percent = float( + scenario_score) / float(scenario_criteria) * 100 s_status = "KO" if scenario_score < scenario_criteria: logger.info(">>>> scenario not OK, score = %s/%s" % @@ -191,11 +193,13 @@ for version in conf.versions: ";" + installer + ";" + s + "\n") f.write(info) - scenario_result_criteria[s] = sr.ScenarioResult(s_status, s_score) + scenario_result_criteria[s] = sr.ScenarioResult(s_status, s_score, + s_score_percent) logger.info("--------------------------") templateLoader = jinja2.FileSystemLoader(conf.REPORTING_PATH) - templateEnv = jinja2.Environment(loader=templateLoader, autoescape=True) + templateEnv = jinja2.Environment( + loader=templateLoader, autoescape=True) TEMPLATE_FILE = "/template/index-status-tmpl.html" template = templateEnv.get_template(TEMPLATE_FILE) |