summaryrefslogtreecommitdiffstats
path: root/dovetail/test_runner.py
AgeCommit message (Collapse)AuthorFilesLines
2019-11-19Fix exception when running HA tests without pod.yamlxudan1-1/+2
1. use volumes '-v' to map files/directories which may be non-existing 2. use mounts '--mount' to map files/directories which couldn't be non-existing JIRA: DOVETAIL-789 Change-Id: I2184e5baed3d1491a2df4d3a1a77a11e3e9b4fc8 Signed-off-by: xudan <xudan16@huawei.com>
2019-09-16Move the proj to python3Panagiotis Karalis1-4/+4
The aim of this patch is to upgrade python version of this project from python2 to python3. Signed-off-by: Panagiotis Karalis <panos.pkaralis@gmail.com> Change-Id: I3d3ef01176fda1b23a0542a24625be2f3368c40e
2019-03-13Calculate checksum for input VNFStamatis Katsaounis1-1/+1
This patch adds checksum information inside ONAP related test case run results. The checksum is produced by the VNF input which can either be a CSAR file or an archive of Heat templates. Change-Id: I0ed58bdc9cc4031da08fd2ac220ef294520ef447 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-02-20Remove deprecated ONAP lifecycle test caseStamatis Katsaounis1-8/+0
This patch removes the ONAP lifecycle deprecated test case. Furthermore, it clears helper functions as well as unwanted configuration. Change-Id: Ib958457cf120ffb641a72be028d3a031741c44c6 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-02-01Add ONAP VVP Heat Template validation testsStamatis Katsaounis1-1/+19
Change-Id: I9a3d56932ce41191901381831013768d1c57a749 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-01-03Add ONAP VNF SDK verification testsxudan1-1/+20
Please refer to env_config.sh.onap.sample when testing it. The guide of preparing local env for onap package validation can be found here https://gerrit.onap.org/r/#/c/75119 Change-Id: I39d6b11544847756126623a7eb3b953dc800c470 Signed-off-by: xudan <xudan16@huawei.com>
2018-12-20Simplify project conf filesxudan1-28/+1
1. use copy commands instead of pre_copy 2. remove redundant items in project conf files 3. make the volume mapping clearer Change-Id: I6c6aa58fac65d7e40105e0a54f6544ee5c47db31 Signed-off-by: xudan <xudan16@huawei.com>
2018-12-11Enable ShellRunnerxudan1-31/+33
1. fix the bug 'ShellRunner' object has no attribute 'archive_logs' 2. remove the testarea_supported because it's not very necessary for the test cases themselves and can make it a little more simple to add a test case with new test area JIRA: DOVETAIL-750 Change-Id: I71ee74615200376adca2a0db040753e5fce329bc Signed-off-by: xudan <xudan16@huawei.com>
2018-11-23Integrate k8s test cassesxudan1-18/+46
In order to integrate k8s test cases, Dovetail framework should do some refactor and make it more general for k8s test cases as well as ONAP ones. Integrate 2 k8s test cases. JIRA: DOVETAIL-748 Change-Id: Ibd87754ffb5fb29f6b4ce79232af860c2ed2da9c Signed-off-by: xudan <xudan16@huawei.com>
2018-11-14Add missing unit tests for test_runner fileStamatis Katsaounis1-8/+8
JIRA: DOVETAIL-724 This patch adds unit tests for Runners classes methods of Dovetail which were missing. Change-Id: Ib985a44db86be02a7b9cefb8deca187bb50e78cc Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2018-11-01Update classes in testcase.pyxudan1-12/+7
1. Remove the functions which are not called anywhere 2. Change some class methods to be static methods and instance methods Change-Id: I2e754cdff61aa34ffe899e352653ff767d4ac69d Signed-off-by: xudan <xudan16@huawei.com>
2018-10-31Update class in container.pyxudan1-12/+15
Change-Id: I4fb24f86c6d15aea5a62baaca20531b2891437ff Signed-off-by: xudan <xudan16@huawei.com>
2018-08-28Change Bottlenecks volume mappingxudan1-0/+1
If mapping to host's /tmp, it won't clean all .log and .out files before run a new test. It causes the results file including all previous results. See https://build.opnfv.org/ci/view/dovetail/job/dovetail-apex-baremetal-default-mandatory-master/26/artifact/results/stress_logs/bottlenecks.stress.ping.out/*view*/ It will affect the results check. Mapping to DOVETAIL_HOME/results/bottlenecks, which will always be cleaned before running another test. Change-Id: I22bfc871d6f041ae38308bf8e8f685993a376973 Signed-off-by: xudan <xudan16@huawei.com>
2018-07-22Remove functest_testsuite and functest_testcase in dovetail_config.ymlxudan1-9/+1
The 2 sections 'functest_testsuite' and 'functest_testcase' are used by all Functest test cases. They aim to parse the results of Tempest sub test cases. Remove them, and check the sub test case list, 1. if it's empty, that means no need to check sub test cases 2. if it is not empty, check the sub test cases one by one. Additional, remove some useless keys in dovetail_config.yml JIRA: DOVETAIL-658 Change-Id: Ic829264b0c8eaedd8e2b3fa55b38a34644482c20 Signed-off-by: xudan <xudan16@huawei.com>
2018-07-12Enable OVP tests to run on a DPDK-enabled systemPanagiotis Karalis1-0/+2
DPDK-enabled NFVIs require support for hugepages which in turn is configured by means of extra_specs in flavors. Currently, Functest enables hugepage support if the name of the scenario contains the substring "ovs". Dovetail allows end users to run all tests on DPDK-enabled systems and the documentation has been updates accordingly. JIRA: DOVETAIL-665 Change-Id: If4898da168f8b4c69a045ef3b00b8a8862f29b0c Signed-off-by: Panagiotis Karalis <pkaralis@intracom-telecom.com>
2018-07-10CI ERROR - File contains violation on test_runnerPanagiotis Karalis1-1/+1
Proposed solution by CI server: "Avoid dangerous file parsing & serialization libs, use yaml.safe_load" Change-Id: Iff9764601bc135cec271e16444d0bbbb4da8d459 Signed-off-by: Panagiotis Karalis <pkaralis@intracom-telecom.com>
2018-06-29Update licence headers to comply with guidelinesGeorg Kunz1-1/+1
Updating the licence headers to comply with the community guidelines [1] and anteater checks. [1] https://wiki.opnfv.org/display/DEV/Contribution+Guidelines#ContributionGuidelines-License Change-Id: Idec787e32daf76c0b1bd6108977b78828125da5e Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
2018-06-14Replace openstack commands with shadexudan1-0/+3
Use openstack shade to get endpoint infomation rather than executing openstack commands directly. The next step can replace openstack commands by shade for some test cases that need to create openstack resources (images, flavors) if we agree to use shade. JIRA: DOVETAIL-659 Change-Id: I72b302fb2d4a61e9249a7e53f81ea9464944dcd3 Signed-off-by: xudan <xudan16@huawei.com>
2018-05-27Archive all test case result filesxudan1-29/+23
1. All detailed tempest test cases results are recorded with file tempest-report.html rather than tempest.log now. 2. Archive all results files include functest.log, yardstick.log ... for each test case. Otherwise, they will all be in one log file. 3. Support to set the source files and dest files need to be archived with the test case config files rather than hardcode with the source code. 4. Give the file which used to be parse the results (PASS/FAIL) with the test case config files rather than hardcode with the source code. Change-Id: I30f435d91ab90cf20def47007f177fe98187484d Signed-off-by: xudan <xudan16@huawei.com>
2018-05-11Adding Neutron trunk port tests to proposed_tests suiteGeorg Kunz1-0/+4
Adding the Neutron trunk port tempest tests to Dovetail and the proposed_tests test suite. JIRA: DOVETAIL-648 Change-Id: Ia77980a245fd1bca6e5f0e567467432e12bf974e Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
2018-05-08Improve the CLI of Dovetail toolxudan1-1/+2
The CLI of dovetail tool needs some improvement. 1. Add an option '--testcase' to support specify test case. 2. Add an option '--no-clean' to keep functest/yardstick/bottlenecks containers for debugging after running the test cases. 3. Improve the local report section. a. Remove some info that is not necessary b. Make the info more clearly JIRA: DOVETAIL-588 Change-Id: Ic769a6e2788b407c3df08ccd593a0ecdaa35e5ea Signed-off-by: xudan <xudan16@huawei.com>
2018-05-07Decoupling Bottlenecks Docker config items from source codexudan1-42/+48
There are some special Docker setting items when creating Bottlenecks Docker Cntainers. Move the special settings to config files. Disable the function to push results to DB. JIRA: DOVETAIL-645 Change-Id: Icc033222edf74c0fe4853dede2794f4226fd4252 Signed-off-by: xudan <xudan16@huawei.com>
2018-05-01Integrating Functest Patrole test caseGeorg Kunz1-0/+2
Adding the new Patrole test case of Functest to Dovetail and to the proposed_tests test suite. JIRA: DOVETAIL-649 Change-Id: I2c3f583cdbd3af75cec020b0fe97f287d23498a5 Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
2018-04-24The refstack file name has been changedxudan1-1/+1
The original refstack results file is refstack/refstack.log For Fraser, it has been changed into refstack/tempest.log Change-Id: I7d40abe0c5a366b5fbb1912ec58d15109f22c0d0 Signed-off-by: xudan <xudan16@huawei.com>
2018-04-10Decoupling Yardstick Docker config items from source codexudan1-1/+2
There are some special Docker setting items when creating Yardstick Docker Containers. 1. Remove the extra settings which are required by Yardstick Danube. 2. Remove the settings for pushing results to DB because Dovetail plan to disable this function. 3. Move the other special Functest settings to config files. JIRA: DOVETAIL-640 Change-Id: Ic2d90393e227d7886b14d805eaa307b7aef56e4a Signed-off-by: xudan <xudan16@huawei.com>
2018-04-10Support to specify docker image for each test casexudan1-3/+4
1. Currently each type of test cases will use one docker image. 2. For example, Functest test cases use opnfv/functest-restapi:euphrates Yardstick uses opnfv/yardstick:opnfv-5.1.0 3. It needs to support to specify the docker image for each test case. 4. For example, vping test cases use opnfv/functest-smoke:euphrates sdnvpn uses opnfv/functest-features:euphrates 5. The benefit of this is that these docker images are well verified by Functest CI and from Functest plan, they may not support functest-restapi docker image in its future release. JIRA: DOVETAIL-638 Change-Id: I8a30eea2233aeff809af2e241b6c939194397832 Signed-off-by: xudan <xudan16@huawei.com>
2018-03-29Integrate dovetail with ONAPMoshe1-0/+8
Change-Id: I6a1fa5f27df2f5127eb00156b3135dc79caf5e77 Issue-ID: DOVETAIL-629 Signed-off-by: Moshe <moshehoa@amdocs.com>
2018-03-15substitute image copy with docker volumeSerenaFeng1-1/+1
Change-Id: Ie470d03bd168c909fd02c316523049c67a6bb095 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2018-03-14Add process info to pod.yaml to specify the info of a special processxudan1-4/+52
1. Many HA test cases try to kill special processes with their name. 2. Then they check corresponding openstack services and the status of processes' recovery. 3. For different SUTs, the names of the processes and the hosts' names may be different. 4. So there is a requirement for Dovetail tool to provide one way to allow users to specify all the infos about process name and its host name. 5. All process infos can be added into file DOVETAIL_HOME/user_config/pod.yaml 6. The infos include 'attack_process' and 'attack_host' for each HA test cases. 7. If not given in this file, will use Yardtsick default values. JIRA: DOVETAIL-627 Change-Id: I83cee991f72a8685080ed562597c70d73002623a Signed-off-by: xudan <xudan16@huawei.com>
2017-08-28Merge "Bugfix: functest only keeps the last test case's log"Leo wang1-0/+24
2017-08-28Bugfix: functest only keeps the last test case's logxudan1-0/+24
JIRA: DOVETAIL-490 1. Dovetail just keeps the last tempest/defcore/ipv6/bgpvpn test's log file. 2. All log files should be kept, so users and developers can know the reason of failed test cases. 3. tempest logs will be stored in directory tempest_logs/ 4. defcore logs will be stored in directory defcore_logs/ 5. IPv6 logs will be stored in directory ipv6_logs/ 6. bgpvpn logs will be stored in directory bgpvpn_logs/ 7. All vping logs are in functest.log Change-Id: I79eae79cb32d65ce1ada3dd6f4c6dfd3945fc512 Signed-off-by: xudan <xudan16@huawei.com>
2017-08-23Bugfix: pre_condition cmds is just executed oncexudan1-11/+7
JIRA: DOVETAIL-489 1. All the cmds defined in pre_condition is just executed once for each type i.e. functest, yardstick, bottlenecks... 2. The copy cmds defined in each functest test cases are just executed for the first test case rather than all test cases. 3. Make the cmds to be executed for each test case. Change-Id: I571f0eb9dd3cab77fc8597e5a9b5246398804d3e Signed-off-by: xudan <xudan16@huawei.com>
2017-08-03Add resiliency test caes into proposed_testsxudan1-1/+9
JIRA: DOVETAIL-474 Add Bottlenecks resiliency test case "posca_factor_ping" into proposed_tests. Change-Id: I76aea651014fb4722ddae07559f417d3f840eee2 Signed-off-by: xudan <xudan16@huawei.com>
2017-06-28Modify Dovetail logsxudan1-18/+18
JIRA: DOVETAIL-450 Change-Id: I795679c9559d1bead3aecefff28d21b6567aac2f Signed-off-by: xudan <xudan16@huawei.com>
2017-05-30sdnvpn offline support in dovetailMatthewLi1-1/+10
JIRA: DOVETAIL-441 Change-Id: I709c62a36c65ef0b4da69c5508f7a8273e68dc2b Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-05-25Change the directories of results and some files to DOVETAIL_HOMExudan1-1/+1
JIRA: DOVETAIL-438 1. Need an env variable DOVETAIL_HOME in env_config.sh 2. env_config.sh, pod.yaml and id_rsa should be put in path DOVETAIL_HOME/pre_config 3. the results will also be put in this path 4. no need to give the path of openstack credential file while running a testsuite 5. if running with the code, source the env_config.sh file before running source $DOVETAIL_HOME/env_config.sh dovetail run --testsuite <testsuite_name> 6. if running with Dovetail docker image docker run -it --privileged=true -e DOVETAIL_HOME=<dovetail_home_path> -v <dovetail_home_path>:<dovetail_home_path> -v /var/run/docker.sock:/var/run/docker.sock opnfv/dovetail:latest /bin/bash Change-Id: Ia23078f27a34e293d0075e49c673930f41069cb6 Signed-off-by: xudan <xudan16@huawei.com>
2017-05-24SDNVPN test cases failed in CIxudan1-6/+26
JIRA: DOVETAIL-439 1. SDNVPN test cases run in CI failed, because the file /home/opnfv/repos/sdnvpn/sdnvpn/test/functest/config.yaml is empty. 2. copy the file userconfig/sdnvpn_config_testcase1/2/4/8.yaml to /home/opnfv/repos/sdnvpn/sdnvpn/test/functest/config.yaml in Functest container Change-Id: Ie904f83c755efc0d9e0abe5dcd44fe4a5056123e Signed-off-by: xudan <xudan16@huawei.com>
2017-04-21use Functest tempest_custom test cases to run all Ipv6 test casesxudan1-1/+2
JIRA: DOVETAIL-401 1. modify all Ipv6 test cases, change tempest_smoke_serial/tempest_full_parallel into tempest_custom, add ID of each sub-testcases. 2. Some sub-testcases in ipv6.tc002, ipv6.tc003, ipv6.tc004 and ipv6.tc005 can not be found in the full tempest test case list. 2. disable testcases' script_result_acquired to enable tempest_custom run multiple times. 3. use build_tag-testcase_name(such as daily-master-79a6e392-28bb-4c40-9d88-a03bed99da2d-dovetail.ipv6.tc025) as the unique ID of each testcase. 4. comment out the progress bar, because it has some problems when print the report text. 5. Functest has changed the TEST_DB_URL from http://<testapi>:<port>/apv/v1 to http://<testapi>:<port>/apv/v1/results. 6. Functest has changed the TEST_DB_URL to file://<file_path>/<file_name>. see https://gerrit.opnfv.org/gerrit/#/c/33511/ Change-Id: I524f6702377f215f526158214842481eb44565be Signed-off-by: xudan <xudan16@huawei.com>
2017-04-01refstack result parseMatthewLi1-3/+4
JIRA: DOVETAIL-375 1, together with other testsuite from functest, such as tempest etc. this should merge after https://gerrit.opnfv.org/gerrit/#/c/31313/ 2, delete some unnecessary definition 3, bugfix of docker cp inside container, see https://build.opnfv.org/ci/view/dovetail/job/dovetail-compass-baremetal-debug-master/361/console 4, disable tempest testcaes since changed to refstack_defcore Change-Id: I67503e348af4a3f697f1b4106bfe81c05add8aa0 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-03-30Merge "dovetail tool: change function pull_image"hongbo tian1-3/+4
2017-03-30dovetail tool: refstack testcase integrationMatthewLi1-0/+5
JIRA: DOVETAIL-370 Change-Id: I60c9f431358f848e24abcb865c4b2ca8c3b2d843 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-03-30dovetail tool: change function pull_imagexudan1-3/+4
JIRA: DOVETAIL-378 1. test_runner checks the result of cmd "pull image". If fail to pull, then break the running. 2. pull_image will return None when there are errors, otherwise return image name. 3. if there is an old image named the same as the new one, the old one's tag will be changed into <none>. In this case, the old image needs to be removed. 4. if there are some containers using this old image, the remove will be skipped rather than logging error. Change-Id: I940cb18911112d5e13f3c14f87ddbdbaced3538a Signed-off-by: xudan <xudan16@huawei.com>
2017-03-29dovetail tool: offline supportMatthewLi1-2/+10
JIRA: DOVETAIL-164 usage: dovetail run --testsuite <testsuite> --offline 1,if --offline given, can run offline by using local docker images (if there is no images, will get an error in log, images can be pulled from dockerhub or downloaded from artifacts.opnfv.org ) 2,if --offline not given, will run online, which means pull docker image from dockerhub Change-Id: I87ab35c82e59fb13a7a88c38d233e89285efc4d3 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-03-20dovetail tool: change name of credentials from creds to openrcxudan1-1/+1
1. change file name from openstack.creds to openrc.sh 2. change the cmd --creds to --openrc/-o 3. now the path of --openrc can be relative path no restrict to abspath 4. remove the useless "work_dir" in dovetail_config.yml JIRA: DOVETAIL-369 JIRA: DOVETAIL-367 Change-Id: I2592438eef060f84132ff7fa226aea93ea947362 Signed-off-by: xudan <xudan16@huawei.com>
2017-02-17dovetail tool: skip testcase status addedMatthewLi1-10/+10
JIRA: DOVETAIL-344 1) testcase status, True/False --> PASS/SKIP/FAIL, so skipped testcase in tempest can be figured out details can be seen in https://etherpad.opnfv.org/p/dovetail_report 2) some variable name changed more readable, such as passed-->testcase_passed failed--> prepare_failed 3) "dovetail report" minor amend according to 1) Change-Id: Ibe8e50693fc474d78e7d0fb89257f34703248579 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-01-11dovetail tool: switch logging to proper usageMatthewLi1-1/+1
JIRA: DOVETAIL-178 Change-Id: Ica814d4ff634c9159e4ecca888b8cc0f6c16e624 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2016-12-26dovetail tool: reorganize function prepare_cmd in testcase.pyxudan1-3/+3
1. move the common statements in prepare_cmd of class FunctestTestcase and Testcase into parse_cmd. JIRA: DOVETAIL-163 Change-Id: I61a0a24b47cfc9e8d49ca9c62fafbac7cce21111 Signed-off-by: xudan <xudan16@huawei.com>
2016-12-22[dovetail tool]check and get results for each cmdLeo Wang1-11/+67
JIRA: DOVETAIL-166 Check the results of each cmds executed in test case 1. the results of pre_condition, post_condition, cmds need to be checked, so it can get a quick fail, dont need to go through the next step 2. it's more accurate to show where error occurred as early as possible 3. get results from shell scripts Change-Id: I5c1e59839c55b92de0e83e7e1eb552aa364b3f80 Signed-off-by: Leo Wang <grakiss.wanglei@huawei.com>
2016-12-14[dovetail tool] support shell scripts for testcase validationLeo Wang1-1/+1
JIRA: DOVETAIL-46 1. for now a testcase has two kinds of validation types(functest, yardstick), and it is not enough to check the complete funcionality 2. add new validation type(shell) for extra validation of the test case to make result more accurate and more convincing. Change-Id: I5c049a71f11cca71a7914f8af704c1983aba3dca Signed-off-by: Leo Wang <grakiss.wanglei@huawei.com>
2016-12-13[dovetail tool] support shell scripts for testcase validationLeo Wang1-0/+100
JIRA: DOVETAIL-46 1. for now a testcase has two kinds of validation types(functest, yardstick), and it is not enough to check the complete funcionality 2. add new validation type(shell) for extra validation of the test case to make result more accurate and more convincing. Change-Id: I45dca6b8dbd888757da163189d261f6e4dba5034 Signed-off-by: Leo Wang <grakiss.wanglei@huawei.com>