From ce59384a6cd7204333db6c05b7d93b99e15f33e4 Mon Sep 17 00:00:00 2001 From: mrichomme Date: Tue, 26 Jun 2018 12:21:57 +0200 Subject: reporting page update * Add new testcases in Master (possible to black list for reporting if needed) * use the version to get the list of testcases according to the version Change-Id: I7999e66c18ebd73db896d0e27bde9a4a3d67f297 Signed-off-by: mrichomme --- reporting/reporting/functest/reporting-status.py | 71 ++++++++++++------------ reporting/reporting/functest/testCase.py | 9 +++ 2 files changed, 46 insertions(+), 34 deletions(-) (limited to 'reporting') diff --git a/reporting/reporting/functest/reporting-status.py b/reporting/reporting/functest/reporting-status.py index 552080d..44ab921 100755 --- a/reporting/reporting/functest/reporting-status.py +++ b/reporting/reporting/functest/reporting-status.py @@ -25,8 +25,6 @@ Functest reporting status LOGGER = rp_utils.getLogger("Functest-Status") # Initialization -testValid = [] -otherTestCases = [] reportingDate = datetime.datetime.now().strftime("%Y-%m-%d %H:%M") # init just connection_check to get the list of scenarios @@ -44,8 +42,6 @@ log_level = rp_utils.get_config('general.log.log_level') exclude_noha = rp_utils.get_config('functest.exclude_noha') exclude_virtual = rp_utils.get_config('functest.exclude_virtual') -functest_yaml_config = rp_utils.getFunctestConfig() - LOGGER.info("*******************************************") LOGGER.info("* *") LOGGER.info("* Generating reporting scenario status *") @@ -57,38 +53,45 @@ LOGGER.info("* NOHA scenarios excluded: %s *", exclude_noha) LOGGER.info("* *") LOGGER.info("*******************************************") -# Retrieve test cases of Tier 1 (smoke) -config_tiers = functest_yaml_config.get("tiers") - -# we consider Tier 0 (Healthcheck), Tier 1 (smoke),2 (features) -# to validate scenarios -# Tier > 2 are not used to validate scenarios but we display the results anyway -# tricky thing for the API as some tests are Functest tests -# other tests are declared directly in the feature projects -for tier in config_tiers: - if tier['order'] >= 0 and tier['order'] < 2: - for case in tier['testcases']: - if case['case_name'] not in blacklist: - testValid.append(tc.TestCase(case['case_name'], - "functest", - case['dependencies'])) - elif tier['order'] == 2: - for case in tier['testcases']: - if case['case_name'] not in blacklist: - otherTestCases.append(tc.TestCase(case['case_name'], - case['case_name'], - case['dependencies'])) - elif tier['order'] > 2: - for case in tier['testcases']: - if case['case_name'] not in blacklist: - otherTestCases.append(tc.TestCase(case['case_name'], - "functest", - case['dependencies'])) - -LOGGER.debug("Functest reporting start") - # For all the versions for version in versions: + testValid = [] + otherTestCases = [] + # Retrieve test cases of Tier 1 (smoke) + version_config = "" + if version != "master": + version_config = "?h=stable/" + version + functest_yaml_config = rp_utils.getFunctestConfig(version_config) + config_tiers = functest_yaml_config.get("tiers") + + # we consider Tier 0 (Healthcheck), Tier 1 (smoke),2 (features) + # to validate scenarios + # Tier > 2 are not used to validate scenarios but we display + # the results anyway + # tricky thing for the API as some tests are Functest tests + # other tests are declared directly in the feature projects + for tier in config_tiers: + if tier['order'] >= 0 and tier['order'] < 2: + for case in tier['testcases']: + if case['case_name'] not in blacklist: + testValid.append(tc.TestCase(case['case_name'], + "functest", + case['dependencies'])) + elif tier['order'] == 2: + for case in tier['testcases']: + if case['case_name'] not in blacklist: + otherTestCases.append(tc.TestCase(case['case_name'], + case['case_name'], + case['dependencies'])) + elif tier['order'] > 2: + for case in tier['testcases']: + if case['case_name'] not in blacklist: + otherTestCases.append(tc.TestCase(case['case_name'], + "functest", + case['dependencies'])) + + LOGGER.debug("Functest reporting start") + # For all the installers scenario_directory = "./display/" + version + "/functest/" scenario_file_name = scenario_directory + "scenario_history.txt" diff --git a/reporting/reporting/functest/testCase.py b/reporting/reporting/functest/testCase.py index d114f8a..dff3f8c 100644 --- a/reporting/reporting/functest/testCase.py +++ b/reporting/reporting/functest/testCase.py @@ -58,7 +58,16 @@ class TestCase(object): 'odl_netvirt': 'Netvirt', 'security_scan': 'Security', 'patrole': 'Patrole', + 'tenantnetwork1': 'tenant network 1', + 'tenantnetwork2': 'tenant network 2', + 'vmready1': 'vm ready 1', + 'vmready2': 'vm ready 2', + 'singlevm1': 'single vm 1', + 'singlevm2': 'single vm 2', + 'cinder_test': 'cinder tests', + 'barbican': 'barbican', 'juju_epc': 'vEPC (Juju)', + 'shaker': 'shaker', 'neutron_trunk': 'Neutron trunk'} try: self.displayName = display_name_matrix[self.name] -- cgit 1.2.3-korg