Update test suite ovp.next according to the latest OVP scope.
Modify Dovetail daily jobs to run all the scope.
There should be 2 jobs.
One for all mandatory test cases and the other for all optional ones.
That's mainly because of that the total executed time will be too large
(more than 300 minutes). Then the job will always failed because of time out.
It's hard to enlarge the time because it's already larger than common 3 hours.
Split it into 2 jobs can avoid the time out issue and make the results
clearer for reviewing.
JIRA: DOVETAIL-694
Change-Id: Ie0ea6221868941781af1477f7c7719f7cb4351a4
Signed-off-by: xudan <xudan16@huawei.com>
help='list the testsuite details')
@click.argument('testsuite', type=click.STRING, required=False)
def testcase_list(testsuite):
- _testcase.list_testcase(testsuite)
+ _testcase.list_testsuites(testsuite)
@cli.command('show',
dt_cfg.load_config_files(constants.CONF_PATH)
Testsuite.load()
- def list_testcase(self, testsuite):
+ def list_one_testsuite(self, testsuite):
+ testsuite_stream = Testsuite.get(testsuite)
+ if testsuite_stream:
+ mandatory = dt_utils.get_value_from_dict(
+ 'testcases_list.mandatory', testsuite_stream)
+ optional = dt_utils.get_value_from_dict(
+ 'testcases_list.optional', testsuite_stream)
+ if mandatory:
+ click.echo("- mandatory")
+ for testcase in mandatory:
+ click.echo(" {}".format(testcase))
+ if optional:
+ click.echo("- optional")
+ for testcase in optional:
+ click.echo(" {}".format(testcase))
+ if not (mandatory or optional):
+ click.echo("No testcase in testsuite {}".format(testsuite))
+ else:
+ click.echo("testsuite {} does not exist".format(testsuite))
+
+ def list_testsuites(self, testsuite):
self.testsuite_load()
if testsuite:
- testsuite_stream = Testsuite.get(testsuite)
- if testsuite_stream:
- testcase_list = []
- for value in testsuite_stream['testcases_list']:
- if value is not None:
- testcase_list.append(value)
- testarea_list = []
- for testcase in testcase_list:
- testarea = testcase.split('.')[1]
- if testarea not in testarea_list:
- testarea_list.append(testarea)
- for testarea in testarea_list:
- click.echo("- %s" % testarea)
- for testcase in testcase_list:
- if testarea in testcase:
- click.echo(" %s" % testcase)
- else:
- click.echo("testsuite %s does not exist or not supported"
- % testsuite)
+ self.list_one_testsuite(testsuite)
else:
testsuite_json = Testsuite.get_all()
if testsuite_json:
for key, value in testsuite_json.items():
- click.echo("- %s" % key)
- testsuite_stream = Testsuite.get(key)
- if testsuite_stream['testcases_list']:
- for testcase in testsuite_stream['testcases_list']:
- click.echo(" %s" % testcase)
- else:
- click.echo("No testcase in testsuite %s" % key)
+ click.echo("--------------------------")
+ click.echo("Test Suite {}".format(key))
+ click.echo("--------------------------")
+ self.list_one_testsuite(key)
else:
click.echo("No testsuite defined yet in dovetail!!!")
configs = filter_config(kwargs, logger)
if configs is not None:
dt_cfg.update_config(configs)
- dt_cfg.dovetail_config['offline'] = True if kwargs['offline'] else False
- dt_cfg.dovetail_config['noclean'] = True if kwargs['no_clean'] else False
- dt_cfg.dovetail_config['stop'] = True if kwargs['stop'] else False
+ dt_cfg.dovetail_config['offline'] = kwargs['offline']
+ dt_cfg.dovetail_config['noclean'] = kwargs['no_clean']
+ dt_cfg.dovetail_config['stop'] = kwargs['stop']
+ dt_cfg.dovetail_config['mandatory'] = kwargs['mandatory']
+ dt_cfg.dovetail_config['optional'] = kwargs['optional']
if kwargs['no_api_validation']:
dt_cfg.dovetail_config['no_api_validation'] = True
logger.warning('Strict API response validation DISABLED.')
logger.error('Test case {} is not defined.'.format(tc))
return None
return testcase_list
+ logger.error("There is no test case to be executed.")
return None
if not testarea:
return True, area_full
- mandatory_list = dt_cfg.dovetail_config['mandatory']
- optional_list = dt_cfg.dovetail_config['optional']
for area in testarea:
if area not in dt_cfg.dovetail_config['testarea_supported']:
return False, None
if area == 'full':
return True, area_full
- if area == 'mandatory':
- for mandatory_area in mandatory_list:
- area_no_duplicate.append(mandatory_area)
- continue
- if area == 'optional':
- for optional_area in optional_list:
- area_no_duplicate.append(optional_area)
- continue
area_no_duplicate.append(area)
area_no_duplicate = list(set(area_no_duplicate))
return True, area_no_duplicate
+ @staticmethod
+ def check_testcase_area(testcase, testarea):
+ if not testcase:
+ return False
+ if testarea == 'full' or testarea in testcase:
+ return True
+ else:
+ return False
+
@classmethod
def get_testcase_list(cls, testsuite, testarea):
testcase_list = []
+ selected_tests = []
testcases = dt_utils.get_value_from_dict('testcases_list', testsuite)
+ mandatory = dt_utils.get_value_from_dict('mandatory', testcases)
+ optional = dt_utils.get_value_from_dict('optional', testcases)
if not testcases:
return testcase_list
- for value in testcases:
+ if dt_cfg.dovetail_config['mandatory']:
+ if not mandatory:
+ cls.logger.error("There is no mandatory test case in "
+ "test suite {}".format(testsuite['name']))
+ else:
+ selected_tests += mandatory
+ if dt_cfg.dovetail_config['optional']:
+ if not optional:
+ cls.logger.error("There is no optional test case in "
+ "test suite {}".format(testsuite['name']))
+ else:
+ selected_tests += optional
+ if (not dt_cfg.dovetail_config['mandatory'] and
+ not dt_cfg.dovetail_config['optional']):
+ if mandatory:
+ selected_tests += mandatory
+ if optional:
+ selected_tests += optional
+
+ if not selected_tests:
+ return None
+ for value in selected_tests:
for area in testarea:
- if value is not None and (area == 'full' or area in value):
+ if cls.check_testcase_area(value, area):
testcase_list.append(value)
break
return testcase_list
healthcheck:
name: healthcheck
testcases_list:
- - dovetail.healthcheck.tc001
- - dovetail.healthcheck.tc002
- - dovetail.healthcheck.tc003
+ optional:
+ - dovetail.healthcheck.snaps_health_check
+ - dovetail.healthcheck.connection_check
+ - dovetail.healthcheck.api_check
onap.1.0.0:
name: onap.1.0.0
testcases_list:
- - dovetail.lifecycle.tc001
\ No newline at end of file
+ optional:
+ - dovetail.lifecycle.tc001
ovp.next:
name: ovp.next
testcases_list:
- # mandatory test cases
- # osinterop
- - dovetail.tempest.osinterop
- # vping
- - dovetail.vping.userdata
- - dovetail.vping.ssh
- # HA
- - dovetail.ha.nova_api
- - dovetail.ha.neutron_server
- - dovetail.ha.keystone
- - dovetail.ha.glance_api
- - dovetail.ha.cinder_api
- - dovetail.ha.cpu_load
- - dovetail.ha.disk_load
- - dovetail.ha.haproxy
- # optional test cases
- # ipv6
- - dovetail.tempest.ipv6_api
- - dovetail.tempest.ipv6_scenario
- # tempest
- # some of the previous tempest test suites tc001 - tc005 have been merged
- # with the smoke tests executed as part of the proposed_test test suite
- - dovetail.tempest.multi_node_scheduling
- - dovetail.tempest.network_security
- - dovetail.tempest.vm_lifecycle
- # sdnvpn
- - dovetail.sdnvpn.subnet_connectivity
- - dovetail.sdnvpn.tenant_separation
- - dovetail.sdnvpn.router_association
- - dovetail.sdnvpn.router_association_floating_ip
+ mandatory:
+ - dovetail.vping.userdata
+ - dovetail.vping.ssh
+ - dovetail.tempest.osinterop
+ - dovetail.tempest.compute
+ - dovetail.tempest.identity_v2
+ - dovetail.tempest.identity_v3
+ - dovetail.tempest.image
+ - dovetail.tempest.network_api
+ - dovetail.tempest.volume
+ - dovetail.tempest.neutron_trunk_ports
+ - dovetail.tempest.ipv6_api
+ - dovetail.security.patrole
+ - dovetail.ha.nova_api
+ - dovetail.ha.neutron_server
+ - dovetail.ha.keystone
+ - dovetail.ha.glance_api
+ - dovetail.ha.cinder_api
+ - dovetail.ha.cpu_load
+ - dovetail.ha.disk_load
+ - dovetail.ha.haproxy
+ - dovetail.ha.rabbitmq
+ - dovetail.ha.database
+ - dovetail.stress.ping
+ optional:
+ - dovetail.tempest.ipv6_scenario
+ - dovetail.tempest.multi_node_scheduling
+ - dovetail.tempest.network_security
+ - dovetail.tempest.vm_lifecycle
+ - dovetail.tempest.network_scenario
+ - dovetail.tempest.bgpvpn
+ - dovetail.sdnvpn.subnet_connectivity
+ - dovetail.sdnvpn.tenant_separation
+ - dovetail.sdnvpn.router_association
+ - dovetail.sdnvpn.router_association_floating_ip
+ - dovetail.ha.neutron_l3_agent
+ - dovetail.ha.controller_restart
+ - dovetail.vnf.vims
+ - dovetail.vnf.vepc
+ - dovetail.snaps.smoke
name: proposed_tests
testcases_list:
# proposed test cases for 2nd release
- # tempest
- - dovetail.tempest.compute
- - dovetail.tempest.identity_v2
- - dovetail.tempest.identity_v3
- - dovetail.tempest.image
- - dovetail.tempest.network_api
- - dovetail.tempest.network_scenario
- - dovetail.tempest.volume
- - dovetail.tempest.neutron_trunk_ports
- # HA
- - dovetail.ha.controller_restart
- - dovetail.ha.rabbitmq
- - dovetail.ha.neutron_l3_agent
- - dovetail.ha.database
- # vnf
- - dovetail.vnf.vims
- - dovetail.vnf.vepc
- # security
- - dovetail.security.patrole
- # sdnvpn
- - dovetail.tempest.bgpvpn
- # snaps
- - dovetail.snaps.smoke
- # stress
- - dovetail.stress.ping
+ mandatory:
+ # tempest
+ - dovetail.tempest.compute
+ - dovetail.tempest.identity_v2
+ - dovetail.tempest.identity_v3
+ - dovetail.tempest.image
+ - dovetail.tempest.network_api
+ - dovetail.tempest.volume
+ - dovetail.tempest.neutron_trunk_ports
+ # HA
+ - dovetail.ha.rabbitmq
+ - dovetail.ha.database
+ # security
+ - dovetail.security.patrole
+ # stress
+ - dovetail.stress.ping
+ optional:
+ - dovetail.tempest.network_scenario
+ - dovetail.ha.controller_restart
+ - dovetail.ha.neutron_l3_agent
+ # vnf
+ - dovetail.vnf.vims
+ - dovetail.vnf.vepc
+ # sdnvpn
+ - dovetail.tempest.bgpvpn
+ # snaps
+ - dovetail.snaps.smoke
flags:
- '--deploy-scenario'
help: 'Specify the DEPLOY_SCENARIO which will be used as input by each testcase respectively'
+ mandatory:
+ flags:
+ - '--mandatory'
+ is_flag: 'True'
+ help: 'Run all mandatory test cases.'
+ optional:
+ flags:
+ - '--optional'
+ is_flag: 'True'
+ help: 'Run all optional test cases.'
# testsuite supported, should adjust accordingly
testsuite_supported:
- - compliance_set
- proposed_tests
- debug
- healthcheck
- 'functest'
- 'bottlenecks'
- 'vnftest'
-
-mandatory:
- - osinterop
- - ha
- - vping
-
-optional:
- - ipv6
- - tempest
- - sdnvpn