From b29ca388d13becc6baa195022d2a28519609dcd9 Mon Sep 17 00:00:00 2001 From: Morgan Richomme Date: Thu, 16 Jun 2016 14:45:44 +0200 Subject: Align test names in BD and testcase.yaml declaration JIRA: FUNCTEST-304 Change-Id: I642101d88716ac634e07b66136cfdcac0c482500 Signed-off-by: Morgan Richomme --- utils/test/reporting/functest/reportingConf.py | 1 + utils/test/reporting/functest/reportingUtils.py | 4 +-- utils/test/reporting/functest/testCase.py | 38 +++++++++++++++++++------ 3 files changed, 33 insertions(+), 10 deletions(-) (limited to 'utils/test/reporting') diff --git a/utils/test/reporting/functest/reportingConf.py b/utils/test/reporting/functest/reportingConf.py index e390a18d2..649246d64 100644 --- a/utils/test/reporting/functest/reportingConf.py +++ b/utils/test/reporting/functest/reportingConf.py @@ -15,3 +15,4 @@ installers = ["apex", "compass", "fuel", "joid"] versions = ["master"] PERIOD = 10 MAX_SCENARIO_CRITERIA = 18 +URL_BASE = 'http://testresults.opnfv.org/test/api/v1/results' diff --git a/utils/test/reporting/functest/reportingUtils.py b/utils/test/reporting/functest/reportingUtils.py index 7170b8398..0db570f32 100644 --- a/utils/test/reporting/functest/reportingUtils.py +++ b/utils/test/reporting/functest/reportingUtils.py @@ -19,7 +19,7 @@ def getApiResults(case, installer, scenario, version): # urllib2.install_opener(opener) # url = "http://127.0.0.1:8000/results?case=" + case + \ # "&period=30&installer=" + installer - url = ("http://testresults.opnfv.org/test/api/v1/results?case=" + case + + url = (reportingConf.URL_BASE + "?case=" + case + "&period=" + str(reportingConf.PERIOD) + "&installer=" + installer + "&scenario=" + scenario + "&version=" + version) request = Request(url) @@ -38,7 +38,7 @@ def getScenarios(case, installer, version): case = case.getName() print case - url = ("http://testresults.opnfv.org/test/api/v1/results?case=" + case + + url = (reportingConf.URL_BASE + "?case=" + case + "&period=" + str(reportingConf.PERIOD) + "&installer=" + installer + "&version=" + version) request = Request(url) diff --git a/utils/test/reporting/functest/testCase.py b/utils/test/reporting/functest/testCase.py index f6ab95a05..f0e8f5995 100644 --- a/utils/test/reporting/functest/testCase.py +++ b/utils/test/reporting/functest/testCase.py @@ -86,17 +86,17 @@ class TestCase(object): # '':'' # I know it is uggly... test_match_matrix = {'healthcheck': 'healthcheck', - 'vping_ssh': 'vPing', - 'vping_userdata': 'vPing_userdata', - 'odl': 'ODL', - 'onos': 'ONOS', - 'ovno': 'ovno', - 'tempest_smoke_serial': 'Tempest', + 'vping_ssh': 'vping_ssh', + 'vping_userdata': 'vping_userdata', + 'odl': 'odl', + 'onos': 'onos', + 'ocl': 'ocl', + 'tempest_smoke_serial': 'tempest_smoke_serial', 'tempest_full_parallel': 'tempest_full_parallel', - 'rally_sanity': 'Rally', + 'rally_sanity': 'rally_sanity', 'bgpvpn': 'bgpvpn', 'rally_full': 'rally_full', - 'vims': 'vIMS', + 'vims': 'vims', 'doctor': 'doctor-notification', 'promise': 'promise' } @@ -104,3 +104,25 @@ class TestCase(object): return test_match_matrix[self.name] except: return "unknown" + + def getTestDisplayName(self): + # Correspondance name of the test case / name in the DB + test_match_matrix = {'healthcheck': 'healthcheck', + 'vping_ssh': 'vPing (ssh)', + 'vping_userdata': 'vPing (userdata)', + 'odl': 'ODL', + 'onos': 'ONOS', + 'ocl': 'OCL', + 'tempest_smoke_serial': 'Tempest (smoke)', + 'tempest_full_parallel': 'Tempest (full)', + 'rally_sanity': 'Rally (smoke)', + 'bgpvpn': 'bgpvpn', + 'rally_full': 'Rally (full)', + 'vims': 'vIMS', + 'doctor': 'Doctor', + 'promise': 'Promise' + } + try: + return test_match_matrix[self.name] + except: + return "unknown" -- cgit 1.2.3-korg