aboutsummaryrefslogtreecommitdiffstats
path: root/functest/ci/run_tests.py
AgeCommit message (Collapse)AuthorFilesLines
2017-03-27Switch TestcaseBase to TestCaseCédric Ollivier1-2/+2
It partially reverts "Rename TestCasesBase into TestcaseBase" [1] and removes the useless suffix too. [1] https://gerrit.opnfv.org/gerrit/#/c/25391/ Change-Id: Iddf2ec8d6c1dafe6e4c6713c2e69969613317471 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-03-07Merge "delete ft_constants and file functest_constants.py"Morgan Richomme1-5/+0
2017-03-07delete ft_constants and file functest_constants.pySerenaFeng1-5/+0
delete no longer used ft_constants in run_test.py substitute ft_constants with CONST in foundation.py and remove useless str() finally delete not-used file functest_constants.py Change-Id: I109a5409e501b610f41aae7d75c55ca745a3d4c1 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-03-02Merge "Remove exec_test.sh"Jose Lausuch1-14/+3
2017-03-01Remove exec_test.shjose.lausuch1-14/+3
After the patch https://gerrit.opnfv.org/gerrit/#/c/29403/ all the test cases in functest have been adapted to the new framework using modules/classes. This patch removes the need for having the script exec_tests.sh which is not used any more by the framework. Change-Id: I7547c908d2eca60edf8c867db920c7da4f23d312 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-03-01Add clean_flag to test casesjose.lausuch1-2/+4
Some test cases such as tempest or those using SNAPS have a built-in cleaup or teardown mechanism. This patch helps to save some time by bypassing the openstack snapshot and cleanup when running those kind of tests cases. Change-Id: I50e7a17937a813532b3756474158416d3e85b922 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-02-23Use new-style classes which inherit from objectLinda Wang1-1/+1
JIRA: FUNCTEST-707 Change-Id: Ieaa888375136eddbbe003a24b32bf09fd0f92923 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-02-14Merge changes from topic 'revert_write_to_file'Jose Lausuch1-1/+1
* changes: Add can_dump_request_to_file decorator Revert "write test results to a local file"
2017-02-13Revert "write test results to a local file"Cédric Ollivier1-1/+1
This reverts commit ee21af78fbfc93e888acda121f08d2b216dd0159. Change-Id: If7c8d3b645073574862eb67225b1e11b0dd7a021 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-02-09Refactoring of args and parser variableashishk19941-33/+43
It also fixes one issue when printing summary for tiers and others induced by [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/26587/ JIRA: FUNCTEST-438 Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: I821efaa7d62b208d797d19563f573d1e28da9df4 Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-02-09Fix source_credentials in openstack_utilsCédric Ollivier1-2/+2
It fixes issues raised when an env var contains '=' (e.g. LS_COLORS). It now exports the vars listed in rc_file without creating a new process. Change-Id: I6e6a4e3ab9c45afe4d40015831acb283acbe564c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-02-02Define how to pass args to TestcaseBase.runCédric Ollivier1-1/+5
Here is an exemple of functest/ci/testcases.yaml run: module: 'functest.opnfv_tests.sdn.odl.odl' class: 'ODLTests' args: suites: - /home/opnfv/repos/odl_test/csit/suites/integration/basic - /home/opnfv/repos/odl_test/csit/suites/openstack/neutron Change-Id: I37b0ffa18f626bd8bb52ed460ae38053bd12c8ee Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-01-25Refactor Rally to adopt OOhelenyao1-4/+0
JIRA: FUNCTEST-541 Change-Id: Ife04f58dc31ca9ba6316cc31577f81a6bf0e0405 Signed-off-by: helenyao <yaohelan@huawei.com>
2017-01-19Merge "write test results to a local file"Morgan Richomme1-1/+1
2017-01-17Merge "Refactoring of args and parser variable in ci/run_tests, prepare_env"Morgan Richomme1-24/+37
2017-01-17write test results to a local filewu.zhihui1-1/+1
Write test result to a file or push it to DB depends on the value format of test_db_url which is defined in config_functest.yaml. Meanwhile, test_db_url can be set by os envrion value "RESULT_STORE". If test_db_url is a url, e.g. http:// or https://, then push result to DB. If test_db_url is a file location, e.g. file:///, then write results to a file with json data. One result record, one line. JIRA: FUNCTEST-657 Change-Id: I579087cd2c24d61a79142b5d67003fb486b6c723 Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
2017-01-12Bugfix: fix the wrong return codehelenyao1-3/+4
The bug was introduced by patch[1] [1] https://gerrit.opnfv.org/gerrit/#/c/24619/ Change-Id: Icf6c267aba26fcb5b129a611423dcf2200f95277 Signed-off-by: helenyao <yaohelan@huawei.com>
2017-01-09Refactoring of args and parser variable in ci/run_tests, prepare_envashishk19941-24/+37
Can't import run_tests in test_run_tests.py (new unit test file). It is throwing error: nosetests: error: unrecognized arguments It is because of declaration of parser and args which are global in file, So to allow safe import of this file, we need to declare it into __main__ branch. Change-Id: Ie11ebcfd8a1b8e692bd8bf4260a54f752b67fd5e Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2016-12-21Refactor test run related modules using new constants providerSerenaFeng1-20/+17
JIRA: FUNCTEST-673 Change-Id: Ia37fb5a08c8fbc4a8acb666565ea887f9ae48b83 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2016-12-15Add check_criteria() in testcase_baseCédric Ollivier1-3/+4
It allows checking testcase results and then returning an error value to CI. Now run() should return EX_OK even if criteria is FAILED. It also fixes an issue induced by [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/24561/ Change-Id: Iaa095696f9dcb87f8cc95179b4f404b092d1e23e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2016-12-14Authenticate clients with keystoneauth1.sessionhelenyao1-0/+1
JIRA: FUNCTEST-529 1. use keystoneauth1.session to initialize the client for each service The keystoneauth1.session.Session class was introduced into keystoneauth1 as an attempt to bring a unified interface to the various OpenStack clients that share common authentication and request parameters between a variety of services. 2. update ODL case to leverage session to get the endpoint info Change-Id: Ic8c01b9b7ed86d3bdd9f5125504bc47f46a37700 Signed-off-by: helenyao <yaohelan@huawei.com>
2016-12-07abstract umbrella part to make integration code simplerSerenaFeng1-2/+2
implement an abstract class Umbrella, and take parser for instance JIRA: FUNCTEST-618 Change-Id: Iadf71ad49abd901b9659cb71135fc902a3b616d1 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2016-12-02Rename TestCasesBase into TestcaseBasehelenyao1-3/+3
JIRA: FUNCTEST-628 1. rename the TestCasesBase into TestcaseBase 2. updated the module name to testcase_base.py Change-Id: Ic6b5d8209098c136613a2419c3790668fdbd493e Signed-off-by: helenyao <yaohelan@huawei.com>
2016-11-30Revert "solve failure testcases are not pushed to testDB problem"Morgan Richomme1-4/+3
This reverts commit a41264c46d583a68d48de041663213752dc62bf3. Change-Id: Id62c5342fffb5d75672127d9765d4cc882e3f4df Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2016-11-24Extracted all global parameters into functest_constants.pyhelenyao1-27/+44
JIRA: FUNCTEST-533 1. Extracted all global variables into functest_constants.py and updated all affected areas accordingly 2. Used os.path.join to replace '/' to come up with the path for better cross-platform support and improve the path accuracy 3. Removed unused variables 4. Updated the hardcoded path in Dockerfile by using variable reference 5. Removed "/" ending from all path variables 6. Updated the unit test Change-Id: Ib30a81d1f0c83fbaef042d63c187c27bd18301bb Signed-off-by: helenyao <yaohelan@huawei.com>
2016-11-24bugfix: correct test report statusSerenaFeng1-1/+1
reporting status of the test result should be checked based on execution result not push_to_db result Change-Id: I6f550f8243ba021108ce899cbebe98f3ff45c0e1 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2016-11-23solve failure testcases are not pushed to testDB problemSerenaFeng1-1/+1
In the new framework, only success testcases will be pushed to testDB, a failure testcases will not be pushed to testDB, which is not correct Modify it with only skipped testcases will not be pushed to testDB Change-Id: Ie3cb06ef0d0f75a7ab0b540d2f9f79d4b56746e6 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2016-11-10Bug fix: fix path in run_tests.pyMorgan Richomme1-1/+1
JIRA: FUNCTEST-525 Change-Id: I78488e04015d28b6ae8d902b252d966920e9b929 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2016-11-10change path for python ci filesMorgan Richomme1-0/+249
JIRA: FUNCTEST-525 Change-Id: I6b09eaec55e42a3ee1474b21bc7ed87a71118e60 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>