diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2016-06-16 14:45:44 +0200 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2016-06-16 18:01:11 +0200 |
commit | df1724a8b59bbebb31845e97018eaea9f4adcaa3 (patch) | |
tree | dc4617972146c0be69783d20d107b58186f3a5b9 | |
parent | 145c9092656bde5904942bb529e1d89814b7cfbf (diff) |
Align test names in BD and testcase.yaml declaration
JIRA: FUNCTEST-304
Change-Id: I642101d88716ac634e07b66136cfdcac0c482500
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
-rw-r--r-- | dashboard/js/opnfv_dashboard_tests_conf.js | 14 | ||||
-rw-r--r-- | reporting/functest/reportingConf.py | 1 | ||||
-rw-r--r-- | reporting/functest/reportingUtils.py | 4 | ||||
-rw-r--r-- | reporting/functest/testCase.py | 38 | ||||
-rw-r--r-- | result_collection_api/update/changes.py | 38 |
5 files changed, 70 insertions, 25 deletions
diff --git a/dashboard/js/opnfv_dashboard_tests_conf.js b/dashboard/js/opnfv_dashboard_tests_conf.js index 6e230d8..870357c 100644 --- a/dashboard/js/opnfv_dashboard_tests_conf.js +++ b/dashboard/js/opnfv_dashboard_tests_conf.js @@ -31,21 +31,21 @@ opnfv_dashboard_installers_scenarios['joid']= var opnfv_dashboard_testcases = {
'VIM': {
- 'Tempest': ['Tempest duration',
+ 'vping_ssh': ['vPing duration'],
+ 'vping_userdata': ['vPing_userdata duration'],
+ 'tempest': ['Tempest duration',
'Tempest nb tests/nb failures'],
- 'vPing': ['vPing duration'],
- 'vPing_userdata': ['vPing_userdata duration'],
- 'Rally': ['rally duration']
+ 'rally_sanity': ['rally duration']
},
'Controller': {
- 'ODL': ['ODL nb tests/nb failures'],
- 'ONOS': ['ONOS FUNCvirNet duration ',
+ 'odl': ['ODL nb tests/nb failures'],
+ 'onos': ['ONOS FUNCvirNet duration ',
'ONOS FUNCvirNet nb tests/nb failures',
'ONOS FUNCvirNetL3 duration',
'ONOS FUNCvirNetL3 nb tests/nb failures']
},
'Features': {
- 'vIMS': ['vIMS nb tests passed/failed/skipped',
+ 'vims': ['vIMS nb tests passed/failed/skipped',
'vIMS orchestrator/VNF/test duration'],
'promise': ['Promise duration ',
'Promise nb tests/nb failures'],
diff --git a/reporting/functest/reportingConf.py b/reporting/functest/reportingConf.py index e390a18..649246d 100644 --- a/reporting/functest/reportingConf.py +++ b/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/reporting/functest/reportingUtils.py b/reporting/functest/reportingUtils.py index 7170b83..0db570f 100644 --- a/reporting/functest/reportingUtils.py +++ b/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/reporting/functest/testCase.py b/reporting/functest/testCase.py index f6ab95a..f0e8f59 100644 --- a/reporting/functest/testCase.py +++ b/reporting/functest/testCase.py @@ -86,17 +86,17 @@ class TestCase(object): # '<name in the config>':'<name in the DB>' # 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" diff --git a/result_collection_api/update/changes.py b/result_collection_api/update/changes.py index 42ab67b..b3e2380 100644 --- a/result_collection_api/update/changes.py +++ b/result_collection_api/update/changes.py @@ -5,21 +5,43 @@ # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 +# 09/06/2016: change for migration after refactoring +# 16/06/2016: Alignment of test name (JIRA: FUNCTEST-304) ############################################################################## collections_old2New = { - 'pod': 'pods', - 'test_projects': 'projects', - 'test_testcases': 'testcases', - 'test_results': 'results' + # 'pod': 'pods', + # 'test_projects': 'projects', + # 'test_testcases': 'testcases', + # 'test_results': 'results' } fields_old2New = { - 'test_results': [({}, {'creation_date': 'start_date'})] + # 'test_results': [({}, {'creation_date': 'start_date'})] } docs_old2New = { - 'test_results': [ - ({'criteria': 'failed'}, {'criteria': 'FAILED'}), - ({'criteria': 'passed'}, {'criteria': 'PASS'}) + # 'test_results': [ + # ({'criteria': 'failed'}, {'criteria': 'FAILED'}), + # ({'criteria': 'passed'}, {'criteria': 'PASS'}) + # ] + 'testcases': [ + ({'name': 'vPing'}, {'name': 'vping_ssh'}), + ({'name': 'Tempest'}, {'name': 'tempest_smoke_serial'}), + ({'name': 'Rally'}, {'name': 'rally_sanity'}), + ({'name': 'ODL'}, {'name': 'odl'}), + ({'name': 'vIMS'}, {'name': 'vims'}), + ({'name': 'ONOS'}, {'name': 'onos'}), + ({'name': 'vPing_userdata'}, {'name': 'vping_userdata'}), + ({'name': 'ovno'}, {'name': 'ocl'}) + ], + 'results': [ + ({'case_name': 'vPing'}, {'case_name': 'vping_ssh'}), + ({'case_name': 'Tempest'}, {'case_name': 'tempest_smoke_serial'}), + ({'case_name': 'Rally'}, {'case_name': 'rally_sanity'}), + ({'case_name': 'ODL'}, {'case_name': 'odl'}), + ({'case_name': 'vIMS'}, {'case_name': 'vims'}), + ({'case_name': 'ONOS'}, {'case_name': 'onos'}), + ({'case_name': 'vPing_userdata'}, {'case_name': 'vping_userdata'}), + ({'case_name': 'ovno'}, {'case_name': 'ocl'}) ] } |